Changeset 4d68584 in mainline for uspace/lib/cpp/include/__bits/thread/packaged_task.hpp
- Timestamp:
- 2019-07-02T10:59:39Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 09170ab8
- Parents:
- 239d25b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/__bits/thread/packaged_task.hpp
r239d25b r4d68584 30 30 #define LIBCPP_BITS_THREAD_PACKAGED_TASK 31 31 32 #include <__bits/exception.hpp> 32 33 #include <__bits/functional/function.hpp> 33 34 #include <__bits/thread/future.hpp> … … 84 85 if (!state_->is_set()) 85 86 { 86 // TODO: store future_error 87 state_->set_exception(make_exception_ptr( 88 future_error{make_error_code(future_errc::broken_promise)} 89 )); 87 90 state_->mark_set(true); 88 91 } … … 162 165 state_->set_value(invoke(func_, args...)); 163 166 } 164 catch( ...)165 { 166 // TODO: store it167 catch(const exception& __exception) 168 { 169 state_->set_exception(make_exception_ptr(__exception)); 167 170 } 168 171 }
Note:
See TracChangeset
for help on using the changeset viewer.