[Mono-bugs] [Bug 41193][Maj] New - stream.BeginRead(...) blocks if no data is present.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Fri, 11 Apr 2003 12:07:49 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kuhne@wanadoo.es.
http://bugzilla.ximian.com/show_bug.cgi?id=41193
--- shadow/41193 Fri Apr 11 12:07:49 2003
+++ shadow/41193.tmp.8650 Fri Apr 11 12:07:49 2003
@@ -0,0 +1,63 @@
+Bug#: 41193
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: kuhne@wanadoo.es
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: stream.BeginRead(...) blocks if no data is present.
+
+Description of Problem:
+-----------------------
+stream.BeginRead(...) blocks if no data is present.
+
+Steps to reproduce the problem:
+-------------------------------
+
+1. Execute this:
+
+using System;
+using System.Threading;
+using System.IO;
+
+
+public class Test
+{
+ public static void Main()
+ {
+ Stream stream = Console.OpenStandardInput();
+ IAsyncResult ar = stream.BeginRead(
+ new byte[256], 0, 256, new AsyncCallback(Callback), stream
+ );
+ Console.WriteLine("Waiting user response");
+ }
+
+
+ public static void Callback(IAsyncResult ar)
+ {
+ Stream stream = (Stream) ar.AsyncState;
+ stream.EndRead(ar);
+ Console.WriteLine("User input readed");
+ }
+}
+
+2. Wait a secod and enter some text and press enter.
+
+Actual Results:
+---------------
+User input readed
+Waiting user response
+
+Expected Results:
+-----------------
+Waiting user response
+User input readed