Ignore:
Timestamp:
Jan 6, 2023, 1:59:00 PM (18 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
e78782b
Parents:
7eac70e
Message:

added and updated future tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/futures/typed.cfa

    r7eac70e r243d998  
    55thread Server {
    66        int cnt;
    7         future(int) * requests[NFUTURES];
     7        single_future(int) * requests[NFUTURES];
    88};
    99
     
    2424void process( Server & this, int i ) {
    2525        if( this.requests[i] == 0p ) return;
    26         future(int) * f = this.requests[i];
     26        single_future(int) * f = this.requests[i];
    2727        this.requests[i] = 0p;
    2828        this.cnt--;
     
    3030}
    3131
    32 void call( Server & mutex this, future(int) & f ) {
     32void call( Server & mutex this, single_future(int) & f ) {
    3333        for(i; NFUTURES) {
    3434                if( this.requests[i] == 0p ) {
     
    7070
    7171void work(void) {
    72         future(int) mine;
     72        single_future(int) mine;
    7373        call( *the_server, mine );
    7474        wait( mine );
Note: See TracChangeset for help on using the changeset viewer.