// array trick to be able to reference enclosing RubyThread
final RubyThread[] waitThread = new RubyThread[1];
waitThread[0] = new RubyThread(
runtime,
(RubyClass) runtime.getClassFromPath("Process::WaitThread"),
new ThreadedRunnable() {
volatile Thread javaThread;
@Override
public Thread getJavaThread() {