21 messages in org.ruby-lang.ruby-talkRe: C Threads and Ruby
FromSent OnAttachments
Kroeger, Simon (ext)20 Jun 2006 03:27 
Patrick Hurley20 Jun 2006 04:28 
Kroeger, Simon (ext)20 Jun 2006 04:59 
Francis Cianfrocca20 Jun 2006 05:13 
Patrick Hurley20 Jun 2006 09:39 
Paul Brannan20 Jun 2006 11:33 
Patrick Hurley20 Jun 2006 13:16 
Francis Cianfrocca20 Jun 2006 13:17 
Francis Cianfrocca20 Jun 2006 13:19 
Simon Kröger20 Jun 2006 14:29 
Joel VanderWerf20 Jun 2006 14:35 
Francis Cianfrocca20 Jun 2006 14:39 
Bill Kelly20 Jun 2006 14:42 
Simon Kröger20 Jun 2006 14:49 
Francis Cianfrocca20 Jun 2006 15:26 
Francis Cianfrocca20 Jun 2006 15:34 
Bill Kelly20 Jun 2006 16:08 
Francis Cianfrocca20 Jun 2006 17:07 
Kroeger, Simon (ext)21 Jun 2006 02:53 
Francis Cianfrocca21 Jun 2006 03:15 
Paul Brannan22 Jun 2006 08:21 
Subject:Re: C Threads and Ruby
From:Francis Cianfrocca (garb@gmail.com)
Date:06/20/2006 02:39:34 PM
List:org.ruby-lang.ruby-talk

Well, b*****it:

------------------------------- $stdout.sync = true rd, wr = IO.pipe

Thread.new do loop do puts 'foo!' sleep 0.5 end end

sleep 2 puts(rd.gets) ------------------------------- <<<

Joel already caught the obvious error in this code. It's also possible you'll hit a platform-dependence with half/full duplex descriptors. Are you using Windows or Unix-like?