/src/wrappers/glib/examples/thread_pool_example.e
Specman e | 20 lines | 17 code | 2 blank | 1 comment | 0 complexity | 01e6cc11aa28df8c2c2c11f59319583a MD5 | raw file
1class THREAD_POOL_EXAMPLE 2inherit G_THREAD_POOL [DO_STUFF] 3creation main 4 5feature 6 main is 7 -- Starting point 8 do 9 make(12, False) -- maximum twelve non exclusive threads. 10 (1|..|100).do_all(agent (i: INTEGER_32) is 11 do 12 push (create {DO_STUFF}.make(100000+i)) 13 end) 14 end 15 16 new_routine: DO_STUFF is 17 do 18 create Result 19 end 20end