Changeset 0fc6b6c in mainline
- Timestamp:
- 2019-07-01T14:52:42Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a552044
- Parents:
- 0d299c93
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/__bits/thread/promise.hpp
r0d299c93 r0fc6b6c 162 162 future<R> get_future() 163 163 { 164 assert(this->state_); 165 166 /** 167 * Note: Future constructor that takes a shared 168 * state as its argument does not call increment 169 * because a future can be created as the only 170 * owner of that state (e.g. when created by 171 * std::async), so we have to do it here. 172 */ 173 this->state_->increment(); 174 164 175 return future<R>{this->state_}; 165 176 } … … 253 264 future<R&> get_future() 254 265 { 266 assert(this->state_); 267 268 /** 269 * Note: Future constructor that takes a shared 270 * state as its argument does not call increment 271 * because a future can be created as the only 272 * owner of that state (e.g. when created by 273 * std::async), so we have to do it here. 274 */ 275 this->state_->increment(); 276 255 277 return future<R&>{this->state_}; 256 278 } … … 315 337 future<void> get_future() 316 338 { 339 assert(this->state_); 340 341 /** 342 * Note: Future constructor that takes a shared 343 * state as its argument does not call increment 344 * because a future can be created as the only 345 * owner of that state (e.g. when created by 346 * std::async), so we have to do it here. 347 */ 348 this->state_->increment(); 349 317 350 return future<void>{this->state_}; 318 351 }
Note:
See TracChangeset
for help on using the changeset viewer.