Index: src/tests/.expect/thread.txt
===================================================================
--- src/tests/.expect/thread.txt	(revision b4d65c7215f3dc3f625972b509f35bfa55439694)
+++ src/tests/.expect/thread.txt	(revision b4d65c7215f3dc3f625972b509f35bfa55439694)
@@ -0,0 +1,22 @@
+User main begin
+First : Suspend No. 1
+First : Suspend No. 2
+First : Suspend No. 3
+First : Suspend No. 4
+First : Suspend No. 5
+First : Suspend No. 6
+First : Suspend No. 7
+First : Suspend No. 8
+First : Suspend No. 9
+First : Suspend No. 10
+Second : Suspend No. 1
+Second : Suspend No. 2
+Second : Suspend No. 3
+Second : Suspend No. 4
+Second : Suspend No. 5
+Second : Suspend No. 6
+Second : Suspend No. 7
+Second : Suspend No. 8
+Second : Suspend No. 9
+Second : Suspend No. 10
+User main end
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision c0aa3360803b4a312708b494a8067a91f03e9e8f)
+++ src/tests/Makefile.am	(revision b4d65c7215f3dc3f625972b509f35bfa55439694)
@@ -30,5 +30,5 @@
 
 all-local :
-	@+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once coroutine
+	@+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once coroutine thread
 
 all-tests :
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision c0aa3360803b4a312708b494a8067a91f03e9e8f)
+++ src/tests/Makefile.in	(revision b4d65c7215f3dc3f625972b509f35bfa55439694)
@@ -651,5 +651,5 @@
 
 all-local :
-	@+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once coroutine
+	@+python test.py vector_test avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once coroutine thread
 
 all-tests :
Index: src/tests/dtor-early-exit.c
===================================================================
--- src/tests/dtor-early-exit.c	(revision c0aa3360803b4a312708b494a8067a91f03e9e8f)
+++ src/tests/dtor-early-exit.c	(revision b4d65c7215f3dc3f625972b509f35bfa55439694)
@@ -28,9 +28,9 @@
 // don't want these called
 void ?{}(A * a) { assert( false ); }
-void ?{}(A * a, char * name) { a->name = name; sout | "construct " | name | endl; a->x = malloc(); }
+void ?{}(A * a, char * name) { a->name = name; sout | "construct " | name | endl; a->x = (int*)malloc(); }
 void ?{}(A * a, char * name, int * ptr) { assert( false ); }
 
 A ?=?(A * a, A a) {  sout | "assign " | a->name | " " | a.name; return a; }
-void ?{}(A * a, A a) { sout | "copy construct " | a.name | endl; a->x = malloc(); }
+void ?{}(A * a, A a) { sout | "copy construct " | a.name | endl; a->x = (int*)malloc(); }
 void ^?{}(A * a) { sout | "destruct " | a->name | endl; free(a->x); }
 
Index: src/tests/test.py
===================================================================
--- src/tests/test.py	(revision c0aa3360803b4a312708b494a8067a91f03e9e8f)
+++ src/tests/test.py	(revision b4d65c7215f3dc3f625972b509f35bfa55439694)
@@ -168,30 +168,34 @@
 
 def run_test_instance(t, generate, dry_run, debug) :
-	# print formated name
-	name_txt = "%20s  " % t.name
-
-	#run the test instance and collect the result
-	test_failed, error = run_single_test(t, generate, dry_run, debug)
-
-	# update output based on current action
-	if generate :
-		failed_txt = "ERROR"
-		success_txt = "Done"
-	else :
-		failed_txt = "FAILED"
-		success_txt = "PASSED"
-
-	#print result with error if needed
-	text = name_txt + (failed_txt if test_failed else success_txt)
-	out = sys.stdout
-	if error :
-		text = text + "\n" + error
-		out = sys.stderr
-
-	print(text, file = out);
-	sys.stdout.flush()
-	sys.stderr.flush()
-
-	return test_failed
+	try :
+		# print formated name
+		name_txt = "%20s  " % t.name
+
+		#run the test instance and collect the result
+		test_failed, error = run_single_test(t, generate, dry_run, debug)
+
+		# update output based on current action
+		if generate :
+			failed_txt = "ERROR"
+			success_txt = "Done"
+		else :
+			failed_txt = "FAILED"
+			success_txt = "PASSED"
+
+		#print result with error if needed
+		text = name_txt + (failed_txt if test_failed else success_txt)
+		out = sys.stdout
+		if error :
+			text = text + "\n" + error
+			out = sys.stderr
+
+		print(text, file = out);
+		sys.stdout.flush()
+		sys.stderr.flush()
+		return test_failed
+	
+	except KeyboardInterrupt:
+		test_failed = True
+
 
 # run the given list of tests with the given parameters
@@ -209,5 +213,5 @@
 	pool = Pool(jobs)
 	try :
-		results = pool.map_async(partial(run_test_instance, generate=generate, dry_run=dry_run, debug=debug), tests ).get(99999999)
+		results = pool.map_async(partial(run_test_instance, generate=generate, dry_run=dry_run, debug=debug), tests ).get(9999)
 	except KeyboardInterrupt:
 		pool.terminate()
Index: src/tests/thread.c
===================================================================
--- src/tests/thread.c	(revision b4d65c7215f3dc3f625972b509f35bfa55439694)
+++ src/tests/thread.c	(revision b4d65c7215f3dc3f625972b509f35bfa55439694)
@@ -0,0 +1,43 @@
+#include <fstream>
+#include <kernel>
+#include <stdlib>
+#include <threads>
+
+struct First { thread t; simple_lock* lock; };
+struct Second { thread t; simple_lock* lock; };
+
+DECL_THREAD(First);
+DECL_THREAD(Second);
+
+void ?{}( First * this, simple_lock* lock ) { this->lock = lock; }
+void ?{}( Second * this, simple_lock* lock ) { this->lock = lock; }
+
+void main(First* this) {
+	for(int i = 0; i < 10; i++) {
+		sout | "First : Suspend No." | i + 1 | endl;
+		yield();
+	}
+	unlock(this->lock);
+}
+
+void main(Second* this) {
+	lock(this->lock);	
+	for(int i = 0; i < 10; i++) {
+		sout | "Second : Suspend No." | i + 1 | endl;
+		yield();
+	}
+}
+
+
+int main(int argc, char* argv[]) {
+	simple_lock lock;
+	sout | "User main begin" | endl;
+	{
+		// processor p;
+		{
+			scoped(First)  f = { &lock };
+			scoped(Second) s = { &lock };
+		}
+	}
+	sout | "User main end" | endl;
+}
Index: src/tests/tupleVariadic.c
===================================================================
--- src/tests/tupleVariadic.c	(revision c0aa3360803b4a312708b494a8067a91f03e9e8f)
+++ src/tests/tupleVariadic.c	(revision b4d65c7215f3dc3f625972b509f35bfa55439694)
@@ -29,5 +29,5 @@
 }
 
-forall(otype T, ttype Params | { void ?{}(T *, Params); })
+forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } )
 T * new(Params p);
 
