From: "Simon Kröger" Date: 2006-06-21T06:29:28+09:00 Subject: Re: C Threads and Ruby Francis Cianfrocca schrieb: >>>> I typically use a pipe for this kind of synchronization. > > Me too. Crude but it works. Well, b*****it: (sorry, no offense intended...) ------------------------------- $stdout.sync = true rd, wr = IO.pipe Thread.new do loop do puts 'foo!' sleep 0.5 end end sleep 2 puts(rd.gets) ------------------------------- ruby 1.8.4 (2005-12-24) [i386-mswin32] gives me 4 foo!s and waits for the rest of eternity. So blocking on a pipe isn't an option for platform independent code. (or am I doing something wrong, please say I'm doing something wrong!) cheers Simon