/src/wrappers/glib/examples/thread_pool_example.e
http://github.com/tybor/Liberty · Specman e · 20 lines · 17 code · 2 blank · 1 comment · 0 complexity · 01e6cc11aa28df8c2c2c11f59319583a MD5 · raw file
- class THREAD_POOL_EXAMPLE
- inherit G_THREAD_POOL [DO_STUFF]
- creation main
- feature
- main is
- -- Starting point
- do
- make(12, False) -- maximum twelve non exclusive threads.
- (1|..|100).do_all(agent (i: INTEGER_32) is
- do
- push (create {DO_STUFF}.make(100000+i))
- end)
- end
- new_routine: DO_STUFF is
- do
- create Result
- end
- end