Changeset 77fd9fe2 for tests/concurrency


Ignore:
Timestamp:
Jun 17, 2023, 9:31:06 AM (18 months ago)
Author:
caparsons <caparson@…>
Branches:
master
Children:
0e0f25d5
Parents:
05956d21
Message:

refactored actor tests to use bar operator

Location:
tests/concurrency/actors
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/actors/dynamic.cfa

    r05956d21 r77fd9fe2  
    2828    derived_actor * d_actor = alloc();
    2929    (*d_actor){};
    30     *d_actor << *d_msg;
     30    *d_actor | *d_msg;
    3131    return Delete;
    3232}
     
    5858    derived_actor * d_actor = alloc();
    5959    (*d_actor){};
    60     *d_actor << *d_msg;
     60    *d_actor | *d_msg;
    6161
    6262    printf("stopping\n");
  • tests/concurrency/actors/executor.cfa

    r05956d21 r77fd9fe2  
    2828    if ( recs % Batch == 0 ) {
    2929        for ( i; Batch ) {
    30             gstart[sends % Set] << shared_msg;
     30            gstart[sends % Set] | shared_msg;
    3131            sends += 1;
    3232        }
     
    9494
    9595        for ( i; Actors ) {
    96                 actors[i] << shared_msg;
     96                actors[i] | shared_msg;
    9797        } // for
    9898
  • tests/concurrency/actors/inherit.cfa

    r05956d21 r77fd9fe2  
    3838        Server2 * s2 = alloc();
    3939        (*s2){};
    40         *s << *dm;
    41         *s2 << *dm2;
     40        *s | *dm;
     41        *s2 | *dm2;
    4242        stop_actor_system();
    4343    }
     
    4949        D_msg2 * dm2 = alloc();
    5050        (*dm2){};
    51         s[0] << *dm;
    52         s[1] << *dm2;
     51        s[0] | *dm;
     52        s[1] | *dm2;
    5353        stop_actor_system();
    5454    }
  • tests/concurrency/actors/inline.cfa

    r05956d21 r77fd9fe2  
    4141        d_msg * dm = alloc();
    4242        (*dm){ 42, 2423 };
    43         da << *dm;
     43        da | *dm;
    4444        stop_actor_system();                                // waits until actors finish
    4545    }
     
    5252        message * mg = &dm;
    5353        virtual_dtor * v = &dm;
    54         da << dm;
     54        da | dm;
    5555        stop_actor_system();                                // waits until actors finish
    5656    }
  • tests/concurrency/actors/matrix.cfa

    r05956d21 r77fd9fe2  
    105105
    106106        for ( unsigned int r = 0; r < xr; r += 1 ) {
    107                 actors[r] << messages[r];
     107                actors[r] | messages[r];
    108108        } // for
    109109
  • tests/concurrency/actors/pingpong.cfa

    r05956d21 r77fd9fe2  
    2525    allocation retval = Nodelete;
    2626    if ( msg.count == times ) retval = Finished;
    27     *po << msg;
     27    *po | msg;
    2828    return retval;
    2929}
     
    3535    allocation retval = Nodelete;
    3636    if ( msg.count == times ) retval = Finished;
    37     *pi << msg;
     37    *pi | msg;
    3838    return retval;
    3939}
     
    5353    pi = &pi_actor;
    5454    p_msg m;
    55     pi_actor << m;
     55    pi_actor | m;
    5656    stop_actor_system();
    5757
  • tests/concurrency/actors/poison.cfa

    r05956d21 r77fd9fe2  
    1818        Server s[10];
    1919        for ( i; 10 ) {
    20             s[i] << finished_msg;
     20            s[i] | finished_msg;
    2121        }
    2222        stop_actor_system();
     
    2929            Server * s = alloc();
    3030            (*s){};
    31             (*s) << delete_msg;
     31            (*s) | delete_msg;
    3232        }
    3333        stop_actor_system();
     
    3939        Server s[10];
    4040        for ( i; 10 )
    41             s[i] << destroy_msg;
     41            s[i] | destroy_msg;
    4242        stop_actor_system();
    4343        for ( i; 10 )
  • tests/concurrency/actors/static.cfa

    r05956d21 r77fd9fe2  
    2525    }
    2626    msg.cnt++;
    27     receiver << msg;
     27    receiver | msg;
    2828    return Nodelete;
    2929}
     
    5555    derived_actor actor;
    5656
    57     actor << msg;
     57    actor | msg;
    5858
    5959    printf("stopping\n");
  • tests/concurrency/actors/types.cfa

    r05956d21 r77fd9fe2  
    7272    b.num = 1;
    7373    c.num = 2;
    74     a << b << c;
     74    a | b | c;
    7575    stop_actor_system();
    7676
     
    8080    d_msg d_ac2_msg;
    8181    d_ac2_msg.num = 3;
    82     d_ac2_0 << d_ac2_msg;
    83     d_ac2_1 << d_ac2_msg;
     82    d_ac2_0 | d_ac2_msg;
     83    d_ac2_1 | d_ac2_msg;
    8484    stop_actor_system();
    8585
     
    9393        d_msg d_ac23_msg;
    9494        d_ac23_msg.num = 4;
    95         d_ac3_0 << d_ac23_msg;
    96         d_ac2_2 << d_ac23_msg;
     95        d_ac3_0 | d_ac23_msg;
     96        d_ac2_2 | d_ac23_msg;
    9797        stop_actor_system();
    9898    } // RAII to clean up executor
     
    107107        b1.num = -1;
    108108        c2.num = 5;
    109         a3 << b1 << c2;
     109        a3 | b1 | c2;
    110110        stop_actor_system();
    111111    } // RAII to clean up executor
     
    120120        b1.num = -1;
    121121        c2.num = 5;
    122         a4 << b1 << c2;
     122        a4 | b1 | c2;
    123123        stop_actor_system();
    124124    } // RAII to clean up executor
Note: See TracChangeset for help on using the changeset viewer.