[MacRuby] #874: Abort occurs when when calls Thread#raise / #kill when Thread#join is called in block of Thread.
#874: Abort occurs when when calls Thread#raise / #kill when Thread#join is called in block of Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- {{{ #!ruby $ cat test.rb t1 = Thread.new {sleep 10} t2 = Thread.new { t1.join } sleep 1 t2.raise #t2.kill }}} Result of MacRuby Trunk: {{{ $ DYLD_LIBRARY_PATH=. ./macruby -I./lib test.rb terminate called after throwing an instance of 'RoxorThreadRaiseException*' zsh: abort DYLD_LIBRARY_PATH=. ./macruby -I./lib test.rb }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/874> MacRuby <http://macruby.org/>
#874: Abort occurs when calls Thread#raise / #kill when Thread#join is called in block of Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- -- Ticket URL: <http://www.macruby.org/trac/ticket/874#comment:1> MacRuby <http://macruby.org/>
#874: Abort occurs when calls Thread#raise / #kill when Thread#join is called in block of Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Changes (by lsansonetti@…): * milestone: => MacRuby 1.0 -- Ticket URL: <http://www.macruby.org/trac/ticket/874#comment:2> MacRuby <http://macruby.org/>
#874: Abort occurs when calls Thread#raise / #kill when Thread#join is called in block of Thread. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby 1.0 Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lastobelus@…): this also causes a crash: {{{ t = Thread.new { STDIN.read(1) } t.kill }}} however, for reading multibyte characters correctly a workaround is to take advantage of the fact that STDIN.read behaves differently on macruby than on standard ruby, sending an EOF after each character. So: {{{ STDIN.read(3) }}} will return immediately for a single key press but will capture all 3 characters of control keys -- Ticket URL: <http://www.macruby.org/trac/ticket/874#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby