I’ve been having a problem with AutoResetEvents, more a puzzlement really. They are synonymous with Win32 Event’s as I understand them.
So in Win32 land, assuming I have multiple threads waiting on this event, from a main app thread if I repeatedly set this event say 8 times, as the event is kind of ref counted, my waiting threads will wake up, do something and continue waiting on the event, exactley 8 times, or rather, whatever work those waiting threads do will be done exactley 8 times, by x number of those waiting threads.
This is not the behaviour I’ve seen when translated into .NET / C#. My waiting threads get activated roughly have the number of times the event is “set”.
It could be me, and I haven’t fully investigated it yet, hence the puzzlement
Published by