http://bugzilla.novell.com/show_bug.cgi?id=312172

User [email protected] added comment
http://bugzilla.novell.com/show_bug.cgi?id=312172#c3


Andrew Kurochka <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]




--- Comment #3 from Andrew Kurochka <[email protected]>  2009-08-06 12:58:52 
MDT ---
I've checked code above and it really behaves differently on Mono. BeginRead
blocks calling thread. Actually, all BeginXXX methods of Console class are
blocking. The problem is that all standard console streams are created as
FileStream with isAsync flag set to false.

[SecurityPermission (SecurityAction.Assert, UnmanagedCode = true)]
public static Stream OpenStandardInput (int bufferSize)
{
    try {
        return new FileStream (MonoIO.ConsoleInput, FileAccess.Read, false,
bufferSize, false /*This argument*/, bufferSize == 0);
    } catch (IOException) {
        return new NullStream ();
    }
}

As result BeginXXX operations are handled by Stream class which, unlike it's
NET variant, executes them syncroniously.

I've tried to use async versions of FileStream contructors and everything seems
to work and behave fine. Waere there reasons to use sync version of FileStream
constructors? Should it be fixed?

What makes me curious, why Mono variant of the Stream class handles differently
BeginXXX methods?

PS Sorry, for long post, I'm new to Mono codebase and trying not to mess up.

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

Reply via email to