[MacRuby] #1425: Should change thread's status during blocking with select
MacRuby
ruby-noreply at macosforge.org
Wed Nov 30 16:54:11 PST 2011
#1425: Should change thread's status during blocking with select
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Test Script:
{{{
#!ruby
require 'socket'
@hostname = "127.0.0.1"
@port = 6000
ready = false
thread = Thread.new do
server = TCPServer.new(@hostname, @port)
ready = true
conn = server.accept
conn << "hello!"
conn.close
server.close
end
while (thread.status and thread.status != 'sleep') or !ready
#p thread.status
Thread.pass
end
p thread.status
p ready
}}}
{{{
$ ruby19 -v t.rb
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0]
"sleep"
true
}}}
However, above script does not finish with MacRuby.
--
Ticket URL: <http://www.macruby.org/trac/ticket/1425>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list