We've written a small test case against Mono 2.7 (r146315) that confirms
that WaitAny() does not return in a consistent amount of time, or sometimes
at all when waiting on more than one WaitHandle. It also appears that there
are no test cases in Mono for this case.

Our attached program takes 2 arguments. The first is the number of
milliseconds to wait before the wait handles are set, the second is the
number of milliseconds to wait in before exiting to give the thread pool
time to notify.

We're running these tests on Mac OS X, if that helps.



Example of Failure case:

ws1048:Mono Patches tom.philpot$ /opt/mono/bin/mono WaitAnyTest.exe 35000
10000
Setup wait handles, sleeping for 35s...
Wait2: Calling WaitAny with 2 WaitHandles
Wait1: Calling WaitAny with 1 WaitHandle
done sleeping.
Setting event 2.
Sleeping for 10s to see if wait handles respond.
Wait1: WaitAny(1) returned 0.


Example of Successful case:

ws1048:Mono Patches tom.philpot$ /opt/mono/bin/mono WaitAnyTest.exe 5000
10000
Setup wait handles, sleeping for 5s...
Wait1: Calling WaitAny with 1 WaitHandle
Wait2: Calling WaitAny with 2 WaitHandles
done sleeping.
Setting event 2.
Sleeping for 10s to see if wait handles respond.
Wait1: WaitAny(1) returned 0.
Wait2: WaitAny(2) returned 1.
RegisteredWaitForSingleObjectCallback called.

Attachment: WaitAnyTest.cs
Description: Binary data

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to