[Mono-devel-list] Regarding blocking Read operation

Atsushi Eno atsushi at ximian.com
Tue Jun 7 10:26:43 EDT 2005


Hi,

I had to implement non-blocking TextReader in xml stream reader,
so it might be also usable for you:

http://svn.myrealbox.com/source/trunk/mcs/class/System.XML/System.Xml/XmlInputStream.cs

You can just copy NonBlockingStreamReader class from this source.

Atsushi Eno

Taru Jain wrote:
> Hi All,
> 
> I am facing some problem with the read operations being blocking. 
> 
> I am launching a process and and have redirected the output/error
> streams. Then using the Read method of the StreamReader class, I read
> from the redirected output/error streams of the process. If there is no
> data coming in either of these streams, then the Read method blocks and
> does not return. 
> 
> As I understand from the documentation, ReadBlock is the blocking
> version of Read method. However, when there is no data in a stream then
> the Read operation is also blocking.
> 
> Is there any other way to do a non blocking read opeartion?
> 
> Thanks in Advance,
> Taru
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 




More information about the Mono-devel-list mailing list