Changeset 063e0626 in mainline for uspace/lib/cpp/src/thread.cpp
- Timestamp:
- 2018-07-05T21:41:20Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a75f3e49
- Parents:
- 4fe4ea6
- git-author:
- Dzejrou <dzejrou@…> (2018-03-02 19:55:30)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:20)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/src/thread.cpp
r4fe4ea6 r063e0626 39 39 thread::~thread() 40 40 { 41 // TODO: Change this to std::terminate when implemented.42 41 if (joinable()) 43 42 { 44 if (joinable_wrapper_ && !joinable_wrapper_->detached()) 45 { 46 joinable_wrapper_->join(); 47 delete joinable_wrapper_; 48 } 43 // TODO: call std::terminate 44 } 49 45 50 // TODO: this crashes :( 51 /* fibril_teardown((fibril_t*)id_, false); */ 52 /* std::abort(); */ 53 } 46 if (joinable_wrapper_ && !joinable_wrapper_->detached()) 47 delete joinable_wrapper_; 54 48 } 55 49 … … 62 56 thread& thread::operator=(thread&& other) noexcept 63 57 { 58 if (joinable()) 59 { 60 // TODO: call std::terminate 61 } 62 64 63 id_ = other.id_; 65 64 other.id_ = fid_t{}; … … 80 79 void thread::join() 81 80 { 82 if (joinable _wrapper_)81 if (joinable() && joinable_wrapper_) 83 82 joinable_wrapper_->join(); 84 83 }
Note:
See TracChangeset
for help on using the changeset viewer.