| 103 | } |
| 104 | |
| 105 | bool Thread::TryStart(const std::function<void ()>& function) |
| 106 | { |
| 107 | m_pimpl->Initialize(function); |
| 108 | bool detached = m_pimpl->m_attributes.IsDetached(); |
| 109 | bool result = m_pimpl->TryStart(); |
| 110 | if (result && detached) |
| 111 | m_pimpl = NULL; |
| 112 | return result; |
| 113 | } |
| 114 | |
| 115 | bool Thread::Join() |
| 116 | { |