| 118 | } |
| 119 | |
| 120 | void Thread::Detach() |
| 121 | { |
| 122 | // After detached, the m_pimpl will be deleted in Thread::Impl::OnExit. |
| 123 | // So don't delete it here, just set it be NULL to mark this thread object |
| 124 | // to be detached. |
| 125 | if (m_pimpl) { |
| 126 | m_pimpl->DoDetach(); |
| 127 | m_pimpl = NULL; |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | bool Thread::IsAlive() const |
| 132 | { |