| 39 | { /* DUMMY BODY */ } |
| 40 | |
| 41 | thread::~thread() |
| 42 | { |
| 43 | // TODO: investigate joinable() in detail |
| 44 | // + std::terminate behaves weirdly on HelenOS |
| 45 | if (joinable() && false) |
| 46 | std::terminate(); |
| 47 | |
| 48 | // TODO: check for finished too? |
| 49 | // TODO: WAIT! if it's not detached, then |
| 50 | // we are joinable and std::terminate was called? |
| 51 | // TODO: review this entire thing |
| 52 | if (joinable_wrapper_ && !joinable_wrapper_->detached()) |
| 53 | delete joinable_wrapper_; |
| 54 | } |
| 55 | |
| 56 | thread::thread(thread&& other) noexcept |
| 57 | : id_{other.id_}, joinable_wrapper_{other.joinable_wrapper_} |