[Mono-bugs] [Bug 659002] New: FileStream shouldn't use thread pool for async I/O

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Dec 11 07:33:46 EST 2010



           Summary: FileStream shouldn't use thread pool for async I/O
    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: mono-bugs at lists.ximian.com
        ReportedBy: sgroot at tkl.iis.u-tokyo.ac.jp
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

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

On Mono, the FileStream.BeginRead/Write classes will use a thread pool thread
which blocks until the I/O completes. This is in contrast to the Microsoft .Net
Framework, which uses OS support for asynchronous I/O and therefore does not
consume a thread pool thread.

It seems Mono implements this functionality for sockets, but not for files.
Strangely enough, this functionality used to be present, but was removed in
this commit:
with the explanation that it was dead code, even though it doesn't look like it

Reproducible: Always

Steps to Reproduce:
This can be reproduced using any application that uses FileStream.BeginRead or
Actual Results:  
The BeginRead and BeginWrite use a thread pool thread to wait for the I/O
operation to complete.

Expected Results:  
I expected Mono to use asynchronous I/O functionality provided by the OS when

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.

More information about the mono-bugs mailing list