please include function _registerThread. static Thread _unregisterThread(Thread t) { _registerThread_threads.remove(t); ret t; }