static void interruptThread(Thread t) { if (t == null) ret; t.interrupt(); InputStream stream = cast vm_generalSubMap("InputStream per thread").get(t); if (stream != null) pcall { print("Closing stream of interrupted thread."); stream.close(); } }