E
Eric Twietmeyer
Hello,
I do not understand the docs for WaitAll. Firstly, what is a
"synchronization domain"? The third parameter to WaitAll is an
"exitContext", which is supposed to indicate whether or not to exit the
synchronization domain before the wait, and then reacquire it after the wait
completes. The only thing I can think of is if you have the following:
lock( some_object )
{
...
bool result = WaitHandle.WaitAll( wait_hdls, timeout, true );
...
}
then with third parameter "true" the lock on "some_object" would be released
before the wait starts, and then it would reacqurie it afterwards. In other
words, this is a synonym for:
lock( some_object )
{
....
}
bool result = WaitHandle.WaitAll( wait_hdls, timeout, false );
lock( some_object )
{
...
}
Is this correct? Is this what the last parameter is for?
Also the docs for WaitAll indicate that the returned bool is:
"true if the method exited the synchronization domain before the wait;
otherwise, false."
Is this correct?
Shouldn't the result indicate whether the wait was satisfied? Otherwise how
do you know whether the wait was satisfied or whether there was a timeout?
The documented return status makes no sense.
Thanks in advance,
Eric
I do not understand the docs for WaitAll. Firstly, what is a
"synchronization domain"? The third parameter to WaitAll is an
"exitContext", which is supposed to indicate whether or not to exit the
synchronization domain before the wait, and then reacquire it after the wait
completes. The only thing I can think of is if you have the following:
lock( some_object )
{
...
bool result = WaitHandle.WaitAll( wait_hdls, timeout, true );
...
}
then with third parameter "true" the lock on "some_object" would be released
before the wait starts, and then it would reacqurie it afterwards. In other
words, this is a synonym for:
lock( some_object )
{
....
}
bool result = WaitHandle.WaitAll( wait_hdls, timeout, false );
lock( some_object )
{
...
}
Is this correct? Is this what the last parameter is for?
Also the docs for WaitAll indicate that the returned bool is:
"true if the method exited the synchronization domain before the wait;
otherwise, false."
Is this correct?
Shouldn't the result indicate whether the wait was satisfied? Otherwise how
do you know whether the wait was satisfied or whether there was a timeout?
The documented return status makes no sense.
Thanks in advance,
Eric