Changeset 427854b for tests/concurrent


Ignore:
Timestamp:
Mar 2, 2020, 4:59:27 PM (20 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
dfa4360
Parents:
37cdd97
Message:

First draft implementation of generators, still missing error checking, testing and clean-up

Location:
tests/concurrent
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/coroutineThen.cfa

    r37cdd97 r427854b  
    4949
    5050void main(Coroutine& this) {
    51         suspend();
     51        suspend;
    5252        for(int i = 0; TEST(i < N); i++) {
    5353
    5454                print("C - Suspending");
    55                 void publish() {
     55                suspend{
    5656                        print("C - Publishing");
    5757                        assert(!the_cor);
    5858                        store( this );
    5959                }
    60                 suspend_then(publish);
    6160                assert(!the_cor);
    6261                print("Coroutine 2");
     
    6564        }
    6665        done = true;
    67         suspend();
     66        suspend;
    6867}
    6968
  • tests/concurrent/coroutineYield.cfa

    r37cdd97 r427854b  
    3333                        sout | "Coroutine 2";
    3434                #endif
    35                 suspend();
     35                suspend;
    3636        }
    3737}
Note: See TracChangeset for help on using the changeset viewer.