Index: tests/concurrent/waituntil/basic_else.cfa
===================================================================
--- tests/concurrent/waituntil/basic_else.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
+++ tests/concurrent/waituntil/basic_else.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
@@ -0,0 +1,17 @@
+#include <select.hfa>
+#include <future.hfa>
+
+future(int) A, B, C;
+
+int main() {
+    waituntil( A ) { printf("A1\n"); } or else { printf("else1\n"); }
+    fulfil( A, 1 );
+    waituntil( A ) { printf("A2\n"); } or else { printf("else2\n"); }
+    reset( A );
+    waituntil( A ) { printf("A3\n"); } or when(true) else { printf("else3\n"); }
+    fulfil( A, 1 );
+    waituntil( A ) { printf("A4\n"); } or when(false) else { printf("else4\n"); }
+    reset( A );
+    fulfil( A, 1 );
+    waituntil( A ) { printf("A5\n"); }
+}
Index: tests/concurrent/waituntil/channel_close.cfa
===================================================================
--- tests/concurrent/waituntil/channel_close.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
+++ tests/concurrent/waituntil/channel_close.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
@@ -0,0 +1,94 @@
+#include <select.hfa>
+#include <thread.hfa>
+#include <channel.hfa>
+#include <time.hfa>
+
+channel(long long int) A, B;
+
+volatile long long int inserts = 0;
+volatile long long int removes = 0;
+
+thread Producer {};
+void main( Producer & this ) {
+    try {
+        for( long long int i = 0;;i++ ) {
+            waituntil( (i >> A) ) { inserts++; }
+            and waituntil( (i >> B) ) { inserts++; }
+        }
+    } catch ( channel_closed * e ) {} 
+}
+
+bool useAnd = false;
+thread Consumer {}; // ensures that the changing when states of Server1 don't result in a deadlock
+void main( Consumer & this ) {
+    long long int in, in2, A_removes = 0, B_removes = 0;
+    try {
+        for( ;; ) {
+            if ( useAnd ) {
+                waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
+                and waituntil( (in2 << B) ) { assert( B_removes == in2 ); B_removes++; removes++; }
+                continue;
+            }
+            waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
+            or waituntil( (in2 << B) ) { assert( B_removes == in2 ); B_removes++; removes++; }
+        }
+    } catchResume ( channel_closed * e ) {} // continue to remove until would block
+    catch ( channel_closed * e ) {} 
+    try {
+        for( ;; )
+            waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
+    } catchResume ( channel_closed * e ) {} // continue to remove until would block
+    catch ( channel_closed * e ) {} 
+    try {
+        for( ;; )
+            waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }
+    } catchResume ( channel_closed * e ) {} // continue to remove until would block
+    catch ( channel_closed * e ) {} 
+}
+
+
+size_t time = 5;
+int main( int argc, char * argv[] ) {
+    if ( argc == 2 )
+        time = atoi( argv[1] );
+
+    processor p[2];
+    A{5};
+    B{5};
+
+    printf("start OR\n");
+    {
+        Producer p;
+        Consumer c;
+        sleep(time`s);
+        printf("done sleep\n");
+        printf("closing A\n");
+        close(A);
+        printf("closing B\n");
+        close(B);
+    }
+    if ( inserts != removes ) 
+        printf("CHECKSUM MISMATCH!! Producer got: %lld, Consumer got: %lld\n", inserts, removes);
+    printf("done\n");
+    ^A{};
+    ^B{};
+
+    inserts = 0;
+    removes = 0;
+    A{5};
+    B{5};
+    printf("start AND\n");
+    {
+        Producer p;
+        Consumer c;
+        sleep(time`s);
+        printf("done sleep\n");
+        printf("closing A\n");
+        close(A);
+        printf("closing B\n");
+        close(B);
+    }
+    if ( inserts != removes ) 
+        printf("CHECKSUM MISMATCH!! Producer got: %lld, Consumer got: %lld\n", inserts, removes);
+    printf("done\n");
+}
Index: tests/concurrent/waituntil/channels.cfa
===================================================================
--- tests/concurrent/waituntil/channels.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
+++ tests/concurrent/waituntil/channels.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
@@ -0,0 +1,86 @@
+#include <select.hfa>
+#include <thread.hfa>
+#include <channel.hfa>
+
+channel(long long int) A, B, C;
+
+volatile bool done = false;
+long long int globalTotal = 0;
+
+thread Server1 {};
+void main( Server1 & this ) {
+    long long int a, b, c, i = 0, myTotal = 0;
+    for( ;;i++ ) {
+        when( i % 2 == 0 ) waituntil( (a << A) ) { myTotal += a; }
+        or when( i % 4 < 2 ) waituntil( (b << B) ) { myTotal += b; }
+        or waituntil( (c << C) ) { if ( c == -1 ) break; myTotal += c; }
+        or when( i % 8 < 4 ) else {}
+    }
+    __atomic_fetch_add( &globalTotal, myTotal, __ATOMIC_SEQ_CST );
+}
+
+thread Drainer {}; // ensures that the changing when states of Server1 don't result in a deadlock
+void main( Drainer & this ) {
+    long long int a, b, c, i = 0, myTotal = 0;
+    for( ;;i++ ) {
+        waituntil( (a << A) ) { myTotal += a; }
+        or waituntil( (b << B) ) { myTotal += b; }
+        or waituntil( (c << C) ) { if ( c == -1 ) break; myTotal += c; }
+    }
+    __atomic_fetch_add( &globalTotal, myTotal, __ATOMIC_SEQ_CST );
+}
+
+thread Churner {}; // performs non-waituntil try insert/remove operations to add churn/interference
+void main( Churner & this ) {
+    long long int out, myTotal = 0;
+    bool success;
+    while( !done ) {
+        try_insert( A, 0 );
+        try_insert( B, 0 );
+        try_insert( C, 0 );
+        [out, success] = try_remove(A);
+        if ( success ) myTotal += out;
+        [out, success] = try_remove(B);
+        if ( success ) myTotal += out;
+        [out, success] = try_remove(C);
+        if ( success ) myTotal += out;
+    }
+    __atomic_fetch_add( &globalTotal, myTotal, __ATOMIC_SEQ_CST );
+}
+
+size_t numtimes = 100000;
+size_t numServers = 3;
+int main( int argc, char * argv[] ) {
+    if ( argc == 2 )
+        numtimes = atoi( argv[1] );
+
+    processor p[numServers + 2];
+    A{5};
+    B{5};
+    C{5};
+
+    long long int total = 0;
+    printf("start\n");
+    {
+        Server1 s[numServers];
+        Drainer d;
+        {
+            Churner c;
+            for( long long int j = 0; j < numtimes; j++ ) {
+                when( j % 2 == 0 ) waituntil( (j >> A) ) { total += j; }
+                or when( j % 4 < 2 ) waituntil( (j >> B) ) { total += j; }
+                and when( j % 8 < 4 ) waituntil( (j >> C) ) { total += j; }
+            }
+            done = true;
+            printf("terminating churner\n");
+        }
+        printf("waiting for empty channels\n");
+        while( get_count(A) > 0 || get_count(B) > 0 || get_count(C) > 0 ) { Pause(); }
+        printf("sending sentinels\n");
+        for ( i; numServers + 1 ) insert( C, -1 );
+        printf("joining servers\n");
+    }
+    if ( total != globalTotal ) 
+        printf("CHECKSUM MISMATCH!! Main thread got %lld, server sum is %lld\n", total, globalTotal);
+    printf("done\n");
+}
Index: tests/concurrent/waituntil/futures.cfa
===================================================================
--- tests/concurrent/waituntil/futures.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
+++ tests/concurrent/waituntil/futures.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
@@ -0,0 +1,61 @@
+#include <select.hfa>
+#include <future.hfa>
+#include <thread.hfa>
+
+future(int) A, B, C;
+
+semaphore s{0};
+
+thread Server1 {};
+void main( Server1 & this ) {
+    fulfil(B, 3);
+    P( s );
+    fulfil(A, 2);
+    fulfil(C, 4);
+}
+
+thread Server2 {};
+void main( Server2 & this ) {
+    fulfil(B, 6);
+    fulfil(A, 5);
+    fulfil(C, 7);
+}
+
+int main() {
+    processor proc[1];
+    printf("start\n"); // currently not working
+    {
+        Server1 s1;
+        waituntil( A ) { get(A); }
+        or waituntil( B ) { get(B); V( s ); }
+        and waituntil( C ) { get(C); }
+    }
+    reset(A);
+    reset(B);
+    reset(C);
+    for ( int i = 0; i < 8; i++ ) {
+        {
+            Server2 s2;
+            when( i % 2 == 0 ) waituntil( A ) { get(A); }
+            or when( i % 4 < 2 ) waituntil( B ) { get(B); }
+            and when( i < 4 ) waituntil( C ) { get(C); }
+        }
+        reset(A);
+        reset(B);
+        reset(C);
+        {
+            Server2 s2;
+            (
+                when( i % 2 == 0 ) waituntil( A ) { get(A); }
+                or when( i % 4 < 2 ) waituntil( B ) { get(B); }
+            )
+            and when( i < 4 ) waituntil( C ) { get(C); }
+        }
+        reset(A);
+        reset(B);
+        reset(C);
+    }
+
+    printf("end\n");
+    return 0;
+}
Index: tests/concurrent/waituntil/locks.cfa
===================================================================
--- tests/concurrent/waituntil/locks.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
+++ tests/concurrent/waituntil/locks.cfa	(revision a33a5e288e95b952ea8dfff1ae1d0dbe375521e6)
@@ -0,0 +1,73 @@
+#include <select.hfa>
+#include <thread.hfa>
+#include <locks.hfa>
+#include <mutex_stmt.hfa>
+
+multiple_acquisition_lock A;
+simple_owner_lock B;
+simple_owner_lock C;
+
+volatile bool done = false;
+
+thread Server1 {};
+void main( Server1 & this ) {
+    while( !done ) {
+        lock(A);
+        unlock(A);
+        lock(B);
+        unlock(B);
+        lock(C);
+        unlock(C);
+        mutex(A,B,C) {};
+    }
+    mutex(sout) sout | "DONE";
+}
+
+size_t numtimes = 10000;
+int main() {
+    processor p[3];
+    int a = 0, b = 0, c = 0;
+    printf("start\n");
+    {
+        Server1 s[3];
+        for( j; numtimes ) {
+            for ( int i = 0; i < 8; i++ ) {
+
+                when( i % 2 == 0 ) waituntil( A ) { a++; }
+                or when( i % 4 < 2 ) waituntil( B ) { b++; }
+                and when( i < 4 ) waituntil( C ) { c++; }
+
+                (
+                    when( i % 2 == 0 ) waituntil( A ) { a++; }
+                    or when( i % 4 < 2 ) waituntil( B ) { b++; }
+                )
+                and when( i < 4 ) waituntil( C ) { c++; }
+                
+                when( i % 2 == 0 ) waituntil( A ) { a++; }
+                and when( i % 4 < 2 ) waituntil( B ) { b++; }
+                and when( i < 4 ) waituntil( C ) { c++; }
+
+                when( i % 2 == 0 ) waituntil( A ) { a++; }
+                or when( i % 4 < 2 ) waituntil( B ) { b++; }
+                or when( i < 4 ) waituntil( C ) { c++; }
+            }
+        }
+        done = true;
+    }
+    printf("start recursive acq test\n");
+    {
+        for( j; 10 ) {
+            lock( A );
+            lock( B );
+        }
+        for ( j; 10 ) {
+            waituntil( A ) { a++; } or waituntil( B ) { b++; }
+            waituntil( B ) { b++; } or waituntil( A ) { a++; }
+        }
+        for( j; 10 ) {
+            unlock( A );
+            unlock( B );
+        }
+    }
+    printf("done\n");
+}
