Skip to content

Commit

Permalink
Make jit.threshold=-1 really not compile anyways syncronously
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Mar 7, 2015
1 parent 31b7cf2 commit 944d98a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions core/src/main/java/org/jruby/compiler/JITCompiler.java
Expand Up @@ -152,20 +152,20 @@ public void fullBuildThresholdReached(final FullBuildSource method, final RubyIn

Runnable jitTask = new FullBuildTask(method);

// if background JIT is enabled and threshold is > 0 and we have an executor...
if (config.getJitBackground() && config.getJitThreshold() > 0 && executor != null) {
// JIT in background
try {
executor.submit(jitTask);
} catch (RejectedExecutionException ree) {
// failed to submit, just run it directly
if (config.getJitThreshold() > 0) {
if (config.getJitBackground() && executor != null) {
try {
executor.submit(jitTask);
} catch (RejectedExecutionException ree) {
// failed to submit, just run it directly
jitTask.run();
}
} else {
// Because are non-asynchonously build if the JIT threshold happens to be 0 we will have no ic yet.
method.ensureInstrsReady();
// just run directly
jitTask.run();
}
} else {
// Because are non-asynchonously build if the JIT threshold happens to be 0 we will have no ic yet.
method.ensureInstrsReady();
// just run directly
jitTask.run();
}
}

Expand Down

0 comments on commit 944d98a

Please sign in to comment.