Francis Cianfrocca wrote:
> Asterix, try this:
> 
> #---------------------------------
> 
> rd,wr = IO.pipe
> 
> Thread.new {
>   loop {
>     puts rd.readpartial(1)
>   }
> }
> 
> loop {
>   sleep 1
>   wr.write "+"
> }
> 
> #---------------------------------
> 
> This works on Linux but I haven't tested it on Windows. And you're 
> right, if you try to use Kernel#select in the reader loop, it doesn't 
> work reliably! (I'm using a Ruby 1.8.4 snapshot from early June, which 
> has changes in nonblocking I/O.) This may be a Ruby bug.

What a shame! It doesn't work on Windows. When comming to the 
readpartial statement the program blocks.

Thank all very much for the time and effort to help me solving the 
problem. Slowly I believe that windows is not able to do blocking 
reading =(

Have you got any further ideas?

Greetings
Asterix

-- 
Posted via http://www.ruby-forum.com/.