Changeset f3da205 for libcfa/src/concurrency/kernel
- Timestamp:
- Jun 10, 2022, 2:59:53 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 10ba012
- Parents:
- 1c56bf7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.