Skip to content

Commit

Permalink
Test out MRI's timeout.rb unmodified to fix jruby#3834.
Browse files Browse the repository at this point in the history
Our native Timeout has not been updated in a long time, and for

* A separate anonymous exception is not used to trigger the
  timeout anymore; instead, they use catch/throw.
* The exception message string is pre-allocated and frozen.
* Various other miscellaneous changes.

This version has *not* been tested for performance, and it will
initially be much slower than our scheduled executor-based version
due to it always spinning up a timeout thread. But we can see how
it goes in test suites and then evaluate how to move forward.

Note that the change to test/jruby/test_timeout.rb was to bring
behavior in line with MRI 2.3.
  • Loading branch information
headius committed May 18, 2016
1 parent a96b0c3 commit 803d51a
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 311 deletions.
1 change: 0 additions & 1 deletion core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
Expand Up @@ -1781,7 +1781,6 @@ private void initBuiltins() {
addLazyBuiltin("io/wait.jar", "io/wait", "org.jruby.ext.io.wait.IOWaitLibrary");
addLazyBuiltin("etc.jar", "etc", "org.jruby.ext.etc.EtcLibrary");
addLazyBuiltin("weakref.rb", "weakref", "org.jruby.ext.weakref.WeakRefLibrary");
addLazyBuiltin("timeout.rb", "timeout", "org.jruby.ext.timeout.Timeout");
addLazyBuiltin("socket.jar", "socket", "org.jruby.ext.socket.SocketLibrary");
addLazyBuiltin("rbconfig.rb", "rbconfig", "org.jruby.ext.rbconfig.RbConfigLibrary");
addLazyBuiltin("jruby/serialization.rb", "serialization", "org.jruby.ext.jruby.JRubySerializationLibrary");
Expand Down
297 changes: 0 additions & 297 deletions core/src/main/java/org/jruby/ext/timeout/Timeout.java

This file was deleted.

Loading

0 comments on commit 803d51a

Please sign in to comment.