Skip to content

Instantly share code, notes, and snippets.

@headius
Created June 3, 2015 20:41
Show Gist options
  • Save headius/60d02c3ec2a58b3274f8 to your computer and use it in GitHub Desktop.
Save headius/60d02c3ec2a58b3274f8 to your computer and use it in GitHub Desktop.
diff --git a/core/src/main/java/org/jruby/compiler/JITCompiler.java b/core/src/main/java/org/jruby/compiler/JITCompiler.java
index cbe41bf..a5e1b67 100644
--- a/core/src/main/java/org/jruby/compiler/JITCompiler.java
+++ b/core/src/main/java/org/jruby/compiler/JITCompiler.java
@@ -55,6 +55,7 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Locale;
import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionException;
@@ -96,7 +97,7 @@ public class JITCompiler implements JITCompilerMBean {
2, // two max
60, // stop then if no jitting for 60 seconds
TimeUnit.SECONDS,
- new LinkedBlockingQueue<Runnable>(),
+ new ArrayBlockingQueue<Runnable>(50, true),
new DaemonThreadFactory("Ruby-" + runtime.getRuntimeNumber() + "-JIT", Thread.MIN_PRIORITY));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment