I know that thread_detachByAddr exists, but the Thread object from Thread.getAll or Thread.opApply doesn't expose the thread address.
Would thread_detachThis work for you? Alternately, you can use pthread_self to get the current thread's address on Posix and GetCurrentThreadId on Windows.