What sync object should i use?

Steven Schveighoffer schveiguy at yahoo.com
Mon May 13 14:55:43 PDT 2013


On Mon, 13 May 2013 17:04:22 -0400, Juan Manuel Cabo  
<juanmanuel.cabo at gmail.com> wrote:

> I seem to recall (though I might be wrong) that win32 events can be  
> signalled before the thread calls WaitForSingleObject (or  
> WaitForMultipleObjects), and if it was signalled, the call returns  
> immediately. I think this was very useful.

Right, the equivalent to a windows event is a D Mutex, Condition, and a  
protected boolean.  In other words, the condition aids synchronization of  
a message, but it is not the message itself!  Windows events could serve  
as the message (but not necessarily).

-Steve


More information about the Digitalmars-d-learn mailing list