Skip to content

Commit

Permalink
Need exceptions booted to set up the sync classes. #4293
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Nov 17, 2016
1 parent 8717e69 commit 2b59c96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 7 additions & 0 deletions core/src/main/java/org/jruby/Ruby.java
Expand Up @@ -52,6 +52,9 @@
import org.jruby.ast.WhileNode;
import org.jruby.compiler.Constantizable;
import org.jruby.compiler.NotCompilableException;
import org.jruby.ext.thread.ConditionVariable;
import org.jruby.ext.thread.Mutex;
import org.jruby.ext.thread.SizedQueue;
import org.jruby.ir.IRScope;
import org.jruby.ir.IRScriptBody;
import org.jruby.javasupport.JavaSupport;
Expand Down Expand Up @@ -1679,6 +1682,10 @@ private void initExceptions() {
}

private void initLibraries() {
Mutex.setup(this);
ConditionVariable.setup(this);
org.jruby.ext.thread.Queue.setup(this);
SizedQueue.setup(this);
new ThreadFiberLibrary().load(this, false);
}

Expand Down
8 changes: 0 additions & 8 deletions core/src/main/java/org/jruby/RubyThread.java
Expand Up @@ -62,9 +62,6 @@
import org.jruby.anno.JRubyMethod;
import org.jruby.exceptions.RaiseException;
import org.jruby.exceptions.ThreadKill;
import org.jruby.ext.thread.ConditionVariable;
import org.jruby.ext.thread.Mutex;
import org.jruby.ext.thread.SizedQueue;
import org.jruby.internal.runtime.NativeThread;
import org.jruby.internal.runtime.RubyRunnable;
import org.jruby.internal.runtime.ThreadLike;
Expand Down Expand Up @@ -439,11 +436,6 @@ public static RubyClass createThreadClass(Ruby runtime) {
location.defineAnnotatedMethods(Location.class);

runtime.setLocation(location);

Mutex.setup(runtime);
ConditionVariable.setup(runtime);
org.jruby.ext.thread.Queue.setup(runtime);
SizedQueue.setup(runtime);

return threadClass;
}
Expand Down

0 comments on commit 2b59c96

Please sign in to comment.