Skip to content

Commit

Permalink
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
Original file line number Diff line number Diff line change
@@ -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();
}
}

0 comments on commit 944d98a

Please sign in to comment.