Index: libcfa/src/concurrency/channel.hfa
===================================================================
--- libcfa/src/concurrency/channel.hfa	(revision 9eb7f07cfca64b294b593355d1385e8bd1d0166c)
+++ libcfa/src/concurrency/channel.hfa	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
@@ -73,5 +73,5 @@
     if ( size != 0 ) delete( buffer );
 }
-static inline size_t get_count( channel(T) & chan ) with(chan) { return count; }
+static inline size_t get_count( channel(T) & chan ) with(chan) { return __atomic_load_n( &count, __ATOMIC_SEQ_CST); }
 static inline size_t get_size( channel(T) & chan ) with(chan) { return size; }
 static inline bool has_waiters( channel(T) & chan ) with(chan) { return !cons`isEmpty || !prods`isEmpty; }
Index: tests/concurrent/channels/.expect/handoff.txt
===================================================================
--- tests/concurrent/channels/.expect/handoff.txt	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
+++ tests/concurrent/channels/.expect/handoff.txt	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
@@ -0,0 +1,5 @@
+start
+waiting for empty channels
+sending sentinels
+joining servers
+done
Index: tests/concurrent/channels/handoff.cfa
===================================================================
--- tests/concurrent/channels/handoff.cfa	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
+++ tests/concurrent/channels/handoff.cfa	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
@@ -0,0 +1,59 @@
+#include <select.hfa>
+#include <thread.hfa>
+#include <channel.hfa>
+
+channel(long long int) C;
+
+volatile bool done = false;
+long long int globalTotal = 0;
+
+thread Server1 {};
+void main( Server1 & this ) {
+    long long int c, i = 0, myTotal = 0;
+    for( ;;i++ ) {
+        c = remove( 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];
+    C{5};
+
+    long long int total = 0;
+    printf("start\n");
+    volatile size_t LINE_COUNTER = 1;
+    {
+        Server1 s[numServers];
+        for( long long int j = 0; j < numtimes; j++ ) {
+            insert( C, j );
+            total += j;
+        }
+        LINE_COUNTER = 2;
+        printf("waiting for empty channels\n");
+        LINE_COUNTER = 3;
+        size_t C_count = get_count( C );
+        LINE_COUNTER = 5;
+        while( C_count > 0 ) { 
+            C_count = get_count( C );
+        }
+        LINE_COUNTER = 7;
+        printf("sending sentinels\n");
+        LINE_COUNTER = 11;
+        for ( i; numServers ) insert( C, -1 );
+        LINE_COUNTER = 13;
+        printf("joining servers\n");
+        LINE_COUNTER = 17;
+    }
+    LINE_COUNTER = 19;
+    if ( total != globalTotal ) 
+        printf("CHECKSUM MISMATCH!! Main thread got %lld, server sum is %lld\n", total, globalTotal);
+    printf("done\n");
+}
Index: tests/concurrent/waituntil/.expect/one_chan_spin.txt
===================================================================
--- tests/concurrent/waituntil/.expect/one_chan_spin.txt	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
+++ tests/concurrent/waituntil/.expect/one_chan_spin.txt	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
@@ -0,0 +1,5 @@
+start
+waiting for empty channels
+sending sentinels
+joining servers
+done
Index: tests/concurrent/waituntil/one_chan.cfa
===================================================================
--- tests/concurrent/waituntil/one_chan.cfa	(revision 9eb7f07cfca64b294b593355d1385e8bd1d0166c)
+++ tests/concurrent/waituntil/one_chan.cfa	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
@@ -37,9 +37,9 @@
         printf("waiting for empty channels\n");
         LINE_COUNTER = 3;
-        size_t C_count = get_count( C );
-        LINE_COUNTER = 5;
-        while( C_count > 0 ) { 
-            C_count = get_count( C );
-        }
+        // size_t C_count = get_count( C );
+        // LINE_COUNTER = 5;
+        // while( C_count > 0 ) { 
+        //     C_count = get_count( C );
+        // }
         LINE_COUNTER = 7;
         printf("sending sentinels\n");
@@ -50,4 +50,5 @@
         LINE_COUNTER = 17;
     }
+    assert(get_count( C ) == 0);
     LINE_COUNTER = 19;
     if ( total != globalTotal ) 
Index: tests/concurrent/waituntil/one_chan_spin.cfa
===================================================================
--- tests/concurrent/waituntil/one_chan_spin.cfa	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
+++ tests/concurrent/waituntil/one_chan_spin.cfa	(revision 2c249718c0bd6140e388ca674fde616caa495aee)
@@ -0,0 +1,56 @@
+#include <select.hfa>
+#include <thread.hfa>
+#include <channel.hfa>
+
+channel(long long int) C;
+
+volatile bool done = false;
+long long int globalTotal = 0;
+
+thread Server1 {};
+void main( Server1 & this ) {
+    long long int c, i = 0, myTotal = 0;
+    for( ;;i++ ) {
+        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];
+    C{5};
+
+    long long int total = 0;
+    printf("start\n");
+    volatile size_t LINE_COUNTER = 1;
+    {
+        Server1 s[numServers];
+        for( long long int j = 0; j < numtimes; j++ ) {
+            waituntil( j >> C ) { total += j; }
+        }
+        LINE_COUNTER = 2;
+        printf("waiting for empty channels\n");
+        LINE_COUNTER = 3;
+        size_t C_count = get_count( C );
+        LINE_COUNTER = 5;
+        while( C_count > 0 ) { 
+            C_count = get_count( C );
+        }
+        LINE_COUNTER = 7;
+        printf("sending sentinels\n");
+        LINE_COUNTER = 11;
+        for ( i; numServers ) insert( C, -1 );
+        LINE_COUNTER = 13;
+        printf("joining servers\n");
+        LINE_COUNTER = 17;
+    }
+    LINE_COUNTER = 19;
+    if ( total != globalTotal ) 
+        printf("CHECKSUM MISMATCH!! Main thread got %lld, server sum is %lld\n", total, globalTotal);
+    printf("done\n");
+}
