F
Felix
I am a little new to windows synchronization, and I was very confused
for a bit by the documentation for Monitor.Wait.
It currently reads:
//Releases the lock on an object and blocks the current thread until
it reacquires //the lock or a specified amount of time elapses.
public static bool Wait(object, int);
If I understand it (and my vocabulary is probably a little off):
// releases the lock on the object and waits until it is singalled or
until the time specified elapses. It is then moved to the ready queue,
and blocks until it can reaquire the lock.
public static bool Wait(object, int timeout);
Furthermore, under the "remarks", I believe the text is just
completely wrong. For instance:
"Once the specified time has elapsed, this method returns a value that
indicates whether or not the lock has been reacquired by the caller."
This is not true, the method could very well block indefinately!!!
Comments appreciated.
Thanks,
Felix
Link to the comment [msdn]:
http://msdn.microsoft.com/library/d...frlrfsystemthreadingmonitorclasswaittopic.asp
for a bit by the documentation for Monitor.Wait.
It currently reads:
//Releases the lock on an object and blocks the current thread until
it reacquires //the lock or a specified amount of time elapses.
public static bool Wait(object, int);
If I understand it (and my vocabulary is probably a little off):
// releases the lock on the object and waits until it is singalled or
until the time specified elapses. It is then moved to the ready queue,
and blocks until it can reaquire the lock.
public static bool Wait(object, int timeout);
Furthermore, under the "remarks", I believe the text is just
completely wrong. For instance:
"Once the specified time has elapsed, this method returns a value that
indicates whether or not the lock has been reacquired by the caller."
This is not true, the method could very well block indefinately!!!
Comments appreciated.
Thanks,
Felix
Link to the comment [msdn]:
http://msdn.microsoft.com/library/d...frlrfsystemthreadingmonitorclasswaittopic.asp