koji 積分 1 編輯於

jruby 派,測一下

jruby-1.7.18 :001 >  require 'timeout'
 => true
jruby-1.7.18 :002 > Timeout::timeout(-1) { puts '-1' }
-1
Timeout::Error: execution expired
    from org/jruby/ext/timeout/Timeout.java:128:in `timeout'
    from (irb):2:in `evaluate'
    from org/jruby/RubyKernel.java:1107:in `eval'
    from org/jruby/RubyKernel.java:1507:in `loop'
    from org/jruby/RubyKernel.java:1270:in `catch'
    from org/jruby/RubyKernel.java:1270:in `catch'
    from /Users/kojilin/.rvm/rubies/jruby-1.7.18/bin/jirb:13:in `(root)'
這是文章的子討論串,你可以回到上層查看所有討論和文章