Changeset 5ab9df4 in mainline
- Timestamp:
- 2019-07-02T14:19:24Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4dfb259
- Parents:
- 72786f38
- Location:
- uspace/lib/cpp/include/__bits/thread
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/__bits/thread/packaged_task.hpp
r72786f38 r5ab9df4 191 191 { 192 192 state_->set_value(invoke(func_, args...), false); 193 aux::set_state_value_at_thread_exit(this->state_); 193 194 } 194 195 catch(const exception& __exception) 195 196 { 196 197 state_->set_exception(make_exception_ptr(__exception), false); 197 } 198 199 aux::set_state_value_at_thread_exit(state_); 198 aux::set_state_exception_at_thread_exit(this->state_); 199 } 200 200 } 201 201 -
uspace/lib/cpp/include/__bits/thread/promise.hpp
r72786f38 r5ab9df4 225 225 } 226 226 227 this->state_->set_value(val, false); 228 aux::set_state_value_at_thread_exit(state_); 227 try 228 { 229 state_->set_value(invoke(func_, args...), false); 230 aux::set_state_value_at_thread_exit(this->state_); 231 } 232 catch(const exception& __exception) 233 { 234 state_->set_exception(make_exception_ptr(__exception), false); 235 aux::set_state_exception_at_thread_exit(this->state_); 236 } 229 237 } 230 238 … … 240 248 } 241 249 242 this->state_->set_value(forward<R>(val), false); 243 aux::set_state_value_at_thread_exit(state_); 250 try 251 { 252 state_->set_value(invoke(func_, args...), false); 253 aux::set_state_value_at_thread_exit(this->state_); 254 } 255 catch(const exception& __exception) 256 { 257 state_->set_exception(make_exception_ptr(__exception), false); 258 aux::set_state_exception_at_thread_exit(this->state_); 259 } 244 260 } 245 261 }; … … 311 327 } 312 328 313 this->state_->set_value(&val, false); 314 aux::set_state_value_at_thread_exit(state_); 329 try 330 { 331 state_->set_value(invoke(func_, args...), false); 332 aux::set_state_value_at_thread_exit(this->state_); 333 } 334 catch(const exception& __exception) 335 { 336 state_->set_exception(make_exception_ptr(__exception), false); 337 aux::set_state_exception_at_thread_exit(this->state_); 338 } 315 339 } 316 340 };
Note:
See TracChangeset
for help on using the changeset viewer.