[Mono-dev] WaitAny does not consistently return when waiting on more than one WaitHandle

Tom Philpot tom.philpot at logos.com
Wed Nov 25 18:59:29 EST 2009


Zoltan,

Would it help if I created a Mac OS specific bugzilla? Is there someone else
that can test this on Mac? (Geoff N, perhaps)?

This behavior is the same (i.e., consistently inconsistent) on 10.5 and 10.6
for what it¹s worth.

Tom

On 11/25/09 3:55 PM, "Zoltan Varga" <vargaz at gmail.com> wrote:

> Hi,
> 
>   This seems to  work fine on linux.
> 
>                    Zoltan
> 
> On Thu, Nov 26, 2009 at 12:01 AM, Tom Philpot <tom.philpot at logos.com> wrote:
>> 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.
>> 
>> 
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091125/b3d35a27/attachment.html 


More information about the Mono-devel-list mailing list