static ClosebleWrapper threadAsCloseable(Thread t) { ret t == null ?: new threadAsCloseable(t, -> cancelThread(t)); }