Robert Klemme wrote:
> Jacek Olszak <jacekolszak / o2.pl> wrote:
>>
>>
>> Unfortunelty "gets" block my whole application - the "b" thread waits
>> until user writes something to the stdin. But I want the b thread not
>> wait and run at the same time.
>>
>> Thanks
>> Jacek
> 
> I'm not sure what you're up to in the end but I'd start with commenting
> Thread.pass. Ruby normally schedules threads automatically and thus you
> usually don't need Thread.pass.  And btw, you can do $stdout.sync=true -
> which removes the necessity of invoking flush.
> 
> Ah, and another note: the first thread blocks the whole app until you 
> enter
> something simply because it's joined on.  The main thread won't exit 
> until
> you enter something.
> 
> HTH
> 
>     robert

First of all... thanks for help. I've set sync to true and remove 
Thread.pass. (but as you said these things won't fix the problem). So 
I've removed _a.join_ call and now everything works! (but wait a second 
- only on my newly installed linux :(, on windows works only with Bill 
solution)

Regards
Jacek

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