Changeset 4d68584 in mainline for uspace/lib/cpp/include/__bits/thread/promise.hpp
- Timestamp:
- 2019-07-02T10:59:39Z (5 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/promise.hpp
r239d25b r4d68584 30 30 #define LIBCPP_BITS_THREAD_PROMISE 31 31 32 #include <__bits/exception.hpp> 32 33 #include <__bits/thread/future.hpp> 33 34 #include <__bits/thread/shared_state.hpp> … … 94 95 } 95 96 96 void set_exception_at_thread_exit(exception_ptr) 97 { 98 // TODO: No exception handling, no-op at this time. 97 void set_exception_at_thread_exit(exception_ptr ptr) 98 { 99 assert(state_); 100 101 state_->set_exception_ptr(ptr, false); 102 // TODO: Mark it as 'has_exception' when thread terminates. 99 103 } 100 104 … … 117 121 if (!state_->is_set()) 118 122 { 119 // TODO: Store future_error. 123 state_->set_exception(make_exception_ptr( 124 future_error{make_error_code(future_errc::broken_promise)} 125 )); 120 126 state_->mark_set(true); 121 127 }
Note:
See TracChangeset
for help on using the changeset viewer.