Changeset 243d998 for tests/concurrent/futures
- Timestamp:
- Jan 6, 2023, 1:59:00 PM (20 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- e78782b
- Parents:
- 7eac70e
- Location:
- tests/concurrent/futures
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/futures/typed.cfa
r7eac70e r243d998 5 5 thread Server { 6 6 int cnt; 7 future(int) * requests[NFUTURES];7 single_future(int) * requests[NFUTURES]; 8 8 }; 9 9 … … 24 24 void process( Server & this, int i ) { 25 25 if( this.requests[i] == 0p ) return; 26 future(int) * f = this.requests[i];26 single_future(int) * f = this.requests[i]; 27 27 this.requests[i] = 0p; 28 28 this.cnt--; … … 30 30 } 31 31 32 void call( Server & mutex this, future(int) & f ) {32 void call( Server & mutex this, single_future(int) & f ) { 33 33 for(i; NFUTURES) { 34 34 if( this.requests[i] == 0p ) { … … 70 70 71 71 void work(void) { 72 future(int) mine;72 single_future(int) mine; 73 73 call( *the_server, mine ); 74 74 wait( mine );
Note: See TracChangeset
for help on using the changeset viewer.