Index: tests/concurrent/waituntil/.expect/chan-and-no-else.txt
===================================================================
--- tests/concurrent/waituntil/.expect/chan-and-no-else.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/.expect/chan-and-no-else.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,5 @@
+start
+waiting for empty channels
+sending sentinels
+joining servers
+done
Index: tests/concurrent/waituntil/.expect/chan-and.txt
===================================================================
--- tests/concurrent/waituntil/.expect/chan-and.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/.expect/chan-and.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,5 @@
+start
+waiting for empty channels
+sending sentinels
+joining servers
+done
Index: tests/concurrent/waituntil/.expect/chan-no-else.txt
===================================================================
--- tests/concurrent/waituntil/.expect/chan-no-else.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/.expect/chan-no-else.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,5 @@
+start
+waiting for empty channels
+sending sentinels
+joining servers
+done
Index: tests/concurrent/waituntil/.expect/chan-or-no-else.txt
===================================================================
--- tests/concurrent/waituntil/.expect/chan-or-no-else.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/.expect/chan-or-no-else.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,5 @@
+start
+waiting for empty channels
+sending sentinels
+joining servers
+done
Index: tests/concurrent/waituntil/.expect/chan-or.txt
===================================================================
--- tests/concurrent/waituntil/.expect/chan-or.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/.expect/chan-or.txt	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,5 @@
+start
+waiting for empty channels
+sending sentinels
+joining servers
+done
Index: tests/concurrent/waituntil/chan-and-no-else.cfa
===================================================================
--- tests/concurrent/waituntil/chan-and-no-else.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/chan-and-no-else.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,62 @@
+#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;
+    bool isDone = false;
+    for( ; !isDone; i++ ) {
+        waituntil( a << A ) { myTotal += a; }
+        and waituntil( b << B ) { myTotal += b; }
+        and waituntil( c << C ) { if ( c == -1 ) { isDone = true; } else myTotal += c; }
+    }
+    __atomic_fetch_add( &globalTotal, myTotal, __ATOMIC_SEQ_CST );
+}
+
+size_t numtimes = 100000;
+size_t numServers = 1;
+int main( int argc, char * argv[] ) {
+    if ( argc == 2 )
+        numtimes = atoi( argv[1] );
+
+    processor p[numServers];
+    A{5};
+    B{5};
+    C{5};
+
+    long long int total = 0;
+    printf("start\n");
+    {
+        Server1 s[numServers];
+        for( long long int j = 0; j < numtimes; j++ ) {
+            waituntil( j >> A ) { total += j; }
+            and waituntil( j >> B ) { total += j; }
+            and waituntil( j >> C ) { total += j; }
+        }
+        printf("waiting for empty channels\n");
+        size_t A_count = get_count( A );
+        size_t B_count = get_count( B );
+        size_t C_count = get_count( C );
+        while( A_count > 0 || B_count > 0 || C_count > 0 ) { 
+            A_count = get_count( A );
+            B_count = get_count( B );
+            C_count = get_count( C );
+        }
+        printf("sending sentinels\n");
+        for ( i; numServers ) {
+            insert( A, 0 );
+            insert( B, 0 );
+            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/chan-and.cfa
===================================================================
--- tests/concurrent/waituntil/chan-and.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/chan-and.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,63 @@
+#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;
+    bool isDone = false;
+    for( ; !isDone; i++ ) {
+        waituntil( a << A ) { myTotal += a; }
+        and waituntil( b << B ) { myTotal += b; }
+        and waituntil( c << C ) { if ( c == -1 ) { isDone = true; } else myTotal += c; } // C_TODO fix breaks inside waituntils
+        or else {}
+    }
+    __atomic_fetch_add( &globalTotal, myTotal, __ATOMIC_SEQ_CST );
+}
+
+size_t numtimes = 100000;
+size_t numServers = 1;
+int main( int argc, char * argv[] ) {
+    if ( argc == 2 )
+        numtimes = atoi( argv[1] );
+
+    processor p[numServers];
+    A{5};
+    B{5};
+    C{5};
+
+    long long int total = 0;
+    printf("start\n");
+    {
+        Server1 s[numServers];
+        for( long long int j = 0; j < numtimes; j++ ) {
+            waituntil( j >> A ) { total += j; }
+            and waituntil( j >> B ) { total += j; }
+            and waituntil( j >> C ) { total += j; }
+        }
+        printf("waiting for empty channels\n");
+        size_t A_count = get_count( A );
+        size_t B_count = get_count( B );
+        size_t C_count = get_count( C );
+        while( A_count > 0 || B_count > 0 || C_count > 0 ) { 
+            A_count = get_count( A );
+            B_count = get_count( B );
+            C_count = get_count( C );
+        }
+        printf("sending sentinels\n");
+        for ( i; numServers ) {
+            insert( A, 0 );
+            insert( B, 0 );
+            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/chan-no-else.cfa
===================================================================
--- tests/concurrent/waituntil/chan-no-else.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/chan-no-else.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,57 @@
+#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++ ) {
+        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 );
+}
+
+size_t numtimes = 100000;
+size_t numServers = 1;
+int main( int argc, char * argv[] ) {
+    if ( argc == 2 )
+        numtimes = atoi( argv[1] );
+
+    processor p[numServers];
+    A{5};
+    B{5};
+    C{5};
+
+    long long int total = 0;
+    printf("start\n");
+    {
+        Server1 s[numServers];
+        for( long long int j = 0; j < numtimes; j++ ) {
+            waituntil( j >> A ) { total += j; }
+            or waituntil( j >> B ) { total += j; }
+            and waituntil( j >> C ) { total += j; }
+        }
+        printf("waiting for empty channels\n");
+        size_t A_count = get_count( A );
+        size_t B_count = get_count( B );
+        size_t C_count = get_count( C );
+        while( A_count > 0 || B_count > 0 || C_count > 0 ) { 
+            A_count = get_count( A );
+            B_count = get_count( B );
+            C_count = get_count( C );
+        }
+        printf("sending sentinels\n");
+        for ( i; numServers ) 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/chan-or-no-else.cfa
===================================================================
--- tests/concurrent/waituntil/chan-or-no-else.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/chan-or-no-else.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,57 @@
+#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++ ) {
+        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 );
+}
+
+size_t numtimes = 100000;
+size_t numServers = 1;
+int main( int argc, char * argv[] ) {
+    if ( argc == 2 )
+        numtimes = atoi( argv[1] );
+
+    processor p[numServers];
+    A{5};
+    B{5};
+    C{5};
+
+    long long int total = 0;
+    printf("start\n");
+    {
+        Server1 s[numServers];
+        for( long long int j = 0; j < numtimes; j++ ) {
+            waituntil( j >> A ) { total += j; }
+            or waituntil( j >> B ) { total += j; }
+            or waituntil( j >> C ) { total += j; }
+        }
+        printf("waiting for empty channels\n");
+        size_t A_count = get_count( A );
+        size_t B_count = get_count( B );
+        size_t C_count = get_count( C );
+        while( A_count > 0 || B_count > 0 || C_count > 0 ) { 
+            A_count = get_count( A );
+            B_count = get_count( B );
+            C_count = get_count( C );
+        }
+        printf("sending sentinels\n");
+        for ( i; numServers ) 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/chan-or.cfa
===================================================================
--- tests/concurrent/waituntil/chan-or.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
+++ tests/concurrent/waituntil/chan-or.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -0,0 +1,58 @@
+#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++ ) {
+        waituntil( a << A ) { myTotal += a; }
+        or waituntil( b << B ) { myTotal += b; }
+        or waituntil( c << C ) { if ( c == -1 ) break; myTotal += c; }
+        or else {}
+    }
+    __atomic_fetch_add( &globalTotal, myTotal, __ATOMIC_SEQ_CST );
+}
+
+size_t numtimes = 100000;
+size_t numServers = 1;
+int main( int argc, char * argv[] ) {
+    if ( argc == 2 )
+        numtimes = atoi( argv[1] );
+
+    processor p[numServers];
+    A{5};
+    B{5};
+    C{5};
+
+    long long int total = 0;
+    printf("start\n");
+    {
+        Server1 s[numServers];
+        for( long long int j = 0; j < numtimes; j++ ) {
+            waituntil( j >> A ) { total += j; }
+            or waituntil( j >> B ) { total += j; }
+            or waituntil( j >> C ) { total += j; }
+        }
+        printf("waiting for empty channels\n");
+        size_t A_count = get_count( A );
+        size_t B_count = get_count( B );
+        size_t C_count = get_count( C );
+        while( A_count > 0 || B_count > 0 || C_count > 0 ) { 
+            A_count = get_count( A );
+            B_count = get_count( B );
+            C_count = get_count( C );
+        }
+        printf("sending sentinels\n");
+        for ( i; numServers ) 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/channels-SPSC.cfa
===================================================================
--- tests/concurrent/waituntil/channels-SPSC.cfa	(revision dd7a8ceea363ce98f8745f9f4506b2c5d56390cc)
+++ tests/concurrent/waituntil/channels-SPSC.cfa	(revision 85e49a60b06151843b3ec9e16256ca7799ac2a23)
@@ -43,5 +43,12 @@
         }
         printf("waiting for empty channels\n");
-        while( get_count( A ) > 0 || get_count( B ) > 0 || get_count( C ) > 0 ) { }
+        size_t A_count = get_count( A );
+        size_t B_count = get_count( B );
+        size_t C_count = get_count( C );
+        while( A_count > 0 || B_count > 0 || C_count > 0 ) { 
+            A_count = get_count( A );
+            B_count = get_count( B );
+            C_count = get_count( C );
+        }
         printf("sending sentinels\n");
         for ( i; numServers ) insert( C, -1 );
