[Mono-bugs] [Bug 549807] New: WaitHandle.WaitAny returns WAIT_IO_COMPLETION (an impossible return value for .NET)
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Oct 23 21:02:48 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=549807
Summary: WaitHandle.WaitAny returns WAIT_IO_COMPLETION (an
impossible return value for .NET)
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: x86
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: joe at mistachkin.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.20)
Gecko/20081217 Firefox/2.0.0.20 (.NET CLR 3.5.30729)
The WaitHandle.WaitAny method can return WAIT_IO_COMPLETION (0xC0) when an APC
is dispatched to the waiting thread. The .NET Framework never returns this
result for this method (in accordance with the documented return values).
Per the docs (http://msdn.microsoft.com/en-us/library/4h1414yz(VS.80).aspx):
"Return Value
The array index of the object that satisfied the wait, or WaitTimeout if no
object satisfied the wait and a time interval equivalent to millisecondsTimeout
has passed."
Reproducible: Always
Steps to Reproduce:
1. Create a thread and have it use WaitHandle.WaitAny (or any derived class,
like ManualResetEvent).
2. Send the created thread an APC using QueueUserAPC via P/Invoke.
3. Check the return value from WaitHandle.WaitAny, it will be 0xC0.
Actual Results:
The method returns WAIT_IO_COMPLETION (0xC0).
Expected Results:
The method should return WaitTimeout or an array index. In this case,
WAIT_IO_COMPLETION should be mapped to WaitTimeout, unless one of the objects
has been signaled.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list