| 81 | static inline id_t get_current() { return std::this_thread::get_id(); } |
| 82 | |
| 83 | Thread(bool detached, std::shared_ptr<Runnable> runnable) |
| 84 | : state_(uninitialized), detached_(detached) { |
| 85 | this->_runnable = runnable; |
| 86 | } |
| 87 | |
| 88 | virtual ~Thread() { |
| 89 | if (!detached_ && thread_->joinable()) { |
no outgoing calls