Changeset f3da205
- Timestamp:
- Jun 10, 2022, 2:59:53 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 10ba012
- Parents:
- 1c56bf7
- Location:
- libcfa/src/concurrency
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/iofwd.hfa
r1c56bf7 rf3da205 76 76 void reset ( io_future_t & this ) { return reset (this.self); } 77 77 bool available( io_future_t & this ) { return available(this.self); } 78 bool setup ( io_future_t & this, oneshot & ctx ) { return setup (this.self, ctx); } 79 bool retract ( io_future_t & this, oneshot & ctx ) { return retract(this.self, ctx); } 78 80 } 79 81 -
libcfa/src/concurrency/kernel/fwd.hfa
r1c56bf7 rf3da205 383 383 384 384 // Wait for any future to be fulfilled 385 future_t & wait_any( future_t * futures, size_t num_futures ) { 385 forall(T& | sized(T) | { bool setup( T&, oneshot & ); bool retract( T&, oneshot & ); }) 386 T & wait_any( T * futures, size_t num_futures ) { 386 387 oneshot temp; 387 388 … … 391 392 if( !setup(futures[i], temp) ) return futures[i]; 392 393 } 393 394 394 395 // Wait context is setup, just wait on it 395 396 wait( temp ); 396 397 397 398 size_t ret; 398 399 // attempt to retract all futures … … 400 401 if ( retract( futures[i], temp ) ) ret = i; 401 402 } 402 403 403 404 return futures[ret]; 404 405 }
Note: See TracChangeset
for help on using the changeset viewer.