PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/src/wrappers/glib/examples/thread_example.e

http://github.com/tybor/Liberty
Specman e | 20 lines | 17 code | 3 blank | 0 comment | 0 complexity | 7c90a7a5436f4e6d812e2a06b151a4cd MD5 | raw file
 1class THREAD_EXAMPLE
 2
 3creation make
 4
 5feature 
 6	make is
 7		do
 8			print("Creating threads...%N")
 9			create t1; create t2; create t3
10			t1.set(100); t2.set(1000); t3.set(2000)
11			t1.start; t2.start; t3.start
12			print("Waiting...")
13			t1.join
14			t2.join
15			t3.join
16			print("ohh%N")
17		end
18
19		t1,t2,t3: MY_THREAD
20end