29 void adopt(
Thread* thread) {
30 if (m_pThread || !thread || thread->
detached()) {
31 panic(
"OwnedThread cannot adopt this worker.");
41 Thread* thread = m_pThread;
42 if (thread->
getStatus() != Thread::AwaitingJoin) {
54 Thread* thread = m_pThread;
56 panic(
"OwnedThread could not join its worker.");
65 Thread* operator->()
const {
69 explicit operator bool()
const {
70 return m_pThread !=
nullptr;