Changeset 72786f38 in mainline for uspace/lib/cpp/include/__bits/thread/packaged_task.hpp
- Timestamp:
- 2019-07-02T14:00:28Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5ab9df4
- Parents:
- d3ba97d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/__bits/thread/packaged_task.hpp
rd3ba97d r72786f38 179 179 void make_ready_at_thread_exit(Args...) 180 180 { 181 // TODO: implement 181 if (!state_) 182 throw future_error{make_error_code(future_errc::no_state)}; 183 if (state_->is_set()) 184 { 185 throw future_error{ 186 make_error_code(future_errc::promise_already_satisfied) 187 }; 188 } 189 190 try 191 { 192 state_->set_value(invoke(func_, args...), false); 193 } 194 catch(const exception& __exception) 195 { 196 state_->set_exception(make_exception_ptr(__exception), false); 197 } 198 199 aux::set_state_value_at_thread_exit(state_); 182 200 } 183 201
Note:
See TracChangeset
for help on using the changeset viewer.