Index: tests/concurrent/futures/.expect/basic.txt
===================================================================
--- tests/concurrent/futures/.expect/basic.txt	(revision 66812dd99f2cc97ee7d08f95d6b009fa64a41a6b)
+++ tests/concurrent/futures/.expect/basic.txt	(revision 2fc9664bb6eac7463cd10d234f4911a24773e08d)
@@ -1,1 +1,2 @@
+start
 done
Index: tests/concurrent/futures/.expect/typed.txt
===================================================================
--- tests/concurrent/futures/.expect/typed.txt	(revision 2fc9664bb6eac7463cd10d234f4911a24773e08d)
+++ tests/concurrent/futures/.expect/typed.txt	(revision 2fc9664bb6eac7463cd10d234f4911a24773e08d)
@@ -0,0 +1,2 @@
+start
+done
Index: tests/concurrent/futures/basic.cfa
===================================================================
--- tests/concurrent/futures/basic.cfa	(revision 66812dd99f2cc97ee7d08f95d6b009fa64a41a6b)
+++ tests/concurrent/futures/basic.cfa	(revision 2fc9664bb6eac7463cd10d234f4911a24773e08d)
@@ -1,3 +1,4 @@
 #include <thread.hfa>
+
 enum {NFUTURES = 10};
 
@@ -83,4 +84,5 @@
 
 int main() {
+	printf( "start\n" );				// non-empty .expect file
 	processor procs[2];
 	{
Index: tests/concurrent/futures/typed.cfa
===================================================================
--- tests/concurrent/futures/typed.cfa	(revision 2fc9664bb6eac7463cd10d234f4911a24773e08d)
+++ tests/concurrent/futures/typed.cfa	(revision 2fc9664bb6eac7463cd10d234f4911a24773e08d)
@@ -0,0 +1,97 @@
+#include <thread.hfa>
+#include <future.hfa>
+enum {NFUTURES = 10};
+
+thread Server {
+	int cnt;
+	future(int) * requests[NFUTURES];
+};
+
+void ?{}( Server & this ) {
+	this.cnt = 0;
+	for(i; NFUTURES) {
+		this.requests[i] = 0p;
+	}
+}
+
+void ^?{}( Server & mutex this ) {
+	assert(this.cnt == 0);
+	for(i; NFUTURES) {
+		this.requests[i] = 0p;
+	}
+}
+
+void process( Server & this, int i ) {
+	if( this.requests[i] == 0p ) return;
+	future(int) * f = this.requests[i];
+	this.requests[i] = 0p;
+	this.cnt--;
+	fulfil( *f , i);
+}
+
+void call( Server & mutex this, future(int) & f ) {
+	for(i; NFUTURES) {
+		if( this.requests[i] == 0p ) {
+			this.requests[i] = &f;
+			this.cnt++;
+			return;
+		}
+	}
+	abort("Monitor Error");
+}
+
+void main( Server & this ) {
+	unsigned i = 0;
+	for() {
+		waitfor( ^?{} : this ) {
+			break;
+		}
+		or when( this.cnt < NFUTURES ) waitfor( call: this ) {}
+		or else {
+			process( this, i % NFUTURES );
+			i++;
+		}
+	}
+
+	for(i; NFUTURES) {
+		process( this, i );
+	}
+}
+
+Server * the_server;
+thread Worker {};
+
+void thrash(void) {
+	volatile int locals[250];
+	for(i; 250) {
+		locals[i] = 0xdeadbeef;
+	}
+}
+
+void work(void) {
+	future(int) mine;
+	call( *the_server, mine );
+	wait( mine );
+}
+
+void main( Worker & ) {
+	for(150) {
+		thrash();
+		work();
+		thrash();
+	}
+}
+
+int main() {
+	printf( "start\n" );				// non-empty .expect file
+	processor procs[2];
+	{
+		Server server;
+		the_server = &server;
+		{
+			Worker workers[17];
+		}
+	}
+	printf( "done\n" );				// non-empty .expect file
+
+}
