/src/wrappers/glib/examples/my_thread.e
http://github.com/tybor/Liberty · Specman e · 18 lines · 13 code · 2 blank · 3 comment · 0 complexity · 45a28501e51af22612e79b04410fefc2 MD5 · raw file
- class MY_THREAD
- inherit G_THREAD
- feature
- run is
- do
- -- print("I'm a new thread, doing hard work (sleeping) for "+secs.to_string+" seconds%N")
- -- sleep(secs.to_natural_32)
- -- print("Done!%N")
- (1|..|upper).for_all(agent is_prime)
- end
-
- upper: INTEGER_32
- set(n: like upper) is do upper:=n end
- sleep (a: NATURAL_32) is
- external "C use <unistd.h>"
- end
- end