if (!block.isGiven()) throw runtime.newThreadError("must be called with a block");
try {
RubyRunnable runnable = new RubyRunnable(this, args, context.getFrames(0), block);
if (RubyInstanceConfig.POOLING_ENABLED) {
FutureThread futureThread = new FutureThread(this, runnable);
threadImpl = futureThread;
addToCorrectThreadGroup(context);
threadImpl.start();
// JRUBY-2380, associate future early so it shows up in Thread.list right away, in case it doesn't run immediately
runtime.getThreadService().associateThread(futureThread.getFuture(), this);
} else {
Thread thread = new Thread(runnable);
thread.setDaemon(true);
thread.setName("Ruby" + thread.getName() + ": " + context.getFile() + ":" + (context.getLine() + 1));
threadImpl = new NativeThread(this, thread);