314315316317318319320321322323324
RubyThread thread = this.thread; if (thread != null) { thread.dieFromFinalizer(); // interrupt Ruby thread to break out of queue sleep, blocking IO thread.interrupt(); // null out references to aid GC data = null; thread = null; }