svoid cancelThread(Thread t) { if (t == null) ret; ping(); ifndef LeanMode ifdef PingV3 var ps = pingSource(t); if (ps == null) warn("No ping source for thread " + t + ", can't cancel"); else ps.cancel(); endifdef ifndef PingV3 synchronized(ping_actions) { ping_actions.put(t, "cancelled"); ping_anyActions = true; } endifndef endifndef }