Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/actors/poison.cfa

    r1950837 r858350a  
    55#include <stdio.h>
    66
    7 struct Server { int val; inline actor; };
    8 
    9 void ?{}( Server & this ) { this.val = 999; }
    10 void ^?{}( Server & this ) { this.val = 777; }
     7struct Server { inline actor; };
    118
    129int main() {
     
    1512    sout | "Finished";
    1613    {
    17         start_actor_system();
    18         Server s[10];
    19         for ( i; 10 ) {
    20             s[i] << FinishedMsg;
    21         }
    22         stop_actor_system();
     14    start_actor_system();
     15    Server s[10];
     16    for ( i; 10 ) {
     17        s[i] << FinishedMsg;
     18    }
     19    stop_actor_system();
    2320    }
    2421
    2522    sout | "Delete";
    2623    {
    27         start_actor_system();
    28         for ( i; 10 ) {
    29             Server * s = alloc();
    30             (*s){};
    31             (*s) << DeleteMsg;
    32         }
    33         stop_actor_system();
     24    start_actor_system();
     25    for ( i; 10 ) {
     26        Server * s = alloc();
     27        (*s){};
     28        (*s) << DeleteMsg;
     29    }
     30    stop_actor_system();
    3431    }
    3532
    3633    sout | "Destroy";
    3734    {
    38         start_actor_system();
    39         Server s[10];
    40         for ( i; 10 )
    41             s[i] << DestroyMsg;
    42         stop_actor_system();
    43         for ( i; 10 )
    44             if (s[i].val != 777)
    45                 sout | "Error: dtor not called correctly.";
     35    start_actor_system();
     36    Server s[10];
     37    for ( i; 10 ) {
     38        s[i] << DestroyMsg;
     39    }
     40    stop_actor_system();
    4641    }
    4742
Note: See TracChangeset for help on using the changeset viewer.