Created
April 11, 2011 14:30
-
-
Save nagachika/913606 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_4558.rb:11:in `join': stream closed (IOError) | |
from test_4558.rb:11:in `<main>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r, w = IO.pipe | |
thr = Thread.new do | |
begin | |
r.read(1) | |
rescue | |
$! | |
end | |
end | |
sleep 0.5 | |
r.close | |
thr.join | |
p thr.value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment