http://bugzilla.novell.com/show_bug.cgi?id=312172
User [email protected] added comment http://bugzilla.novell.com/show_bug.cgi?id=312172#c2 Ben Henderson <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Version|unspecified |2.4.x --- Comment #2 from Ben Henderson <[email protected]> 2009-04-20 06:23:31 MDT --- I have also run into this bug... Running Mono 2.4 in verbose mode, the call stack seems to indicate that BeginRead is calling Read. Would be a nice to have. ;) using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Threading; namespace async_stdin { class Program { protected Stream inputStream; protected volatile bool exitProcess = false; public void Test() { inputStream = Console.OpenStandardInput(); if (inputStream != null) { inputStream.BeginRead(new byte[1], 0, 1, new AsyncCallback(KeyboardInputCallback), null); Console.WriteLine("Press a key to exit..."); while (! exitProcess) { Console.WriteLine("Processing..."); Thread.Sleep(1000); } Console.WriteLine("Shutting down..."); } } protected void KeyboardInputCallback(IAsyncResult asyncResult) { Console.WriteLine("User pressed a key... time to exit"); exitProcess = true; } static void Main(string[] args) { Program prg = new Program(); prg.Test(); } } } -- 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
