https://bugzilla.novell.com/show_bug.cgi?id=659003

https://bugzilla.novell.com/show_bug.cgi?id=659003#c0


           Summary: ThreadPool.RegisterWaitForSingleObject should not
                    consume thread pool threads
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---
           Blocker: ---


Created an attachment (id=404454)
 --> (http://bugzilla.novell.com/attachment.cgi?id=404454)
Sample application demonstrating the issue

User-Agent:       Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64;
Trident/5.0)

In Mono, the ThreadPool.RegisterWaitForSingleObject function simply calls
QueueUserWorkItem with a callback that waits for the object, which consumes a
thread pool thread.

In the Microsoft .Net Framework, RegisterWaitForSingleObject uses a single
thread to wait for all registered objects, and only dispatches a thread pool
thread once a wait handle is signalled. This means that you can use
RegisterWaitForSingleObject to wait for events that may not be signalled for a
long time without consuming thread pool threads.

Reproducible: Always

Steps to Reproduce:
Run the attached sample application, which exhausts the threads in the thread
pool by calling RegisterWaitForSingleObject, and then attempts to call
QueueUserWorkItem.
Actual Results:  
The thread pool threads are exhausted by the calls to
RegisterWaitForSingleObject.

Expected Results:  
I expected RegisterWaitForSingleObject not to consume thread pool threads so
the work item would be able to run, as is the case on .Net

-- 
Configure bugmail: https://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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to