indexing description: "root class for testing" author: "Patrick Ruckstuhl " date: "$Date$" revision: "$Revision$" class ROOT_CLASS create make feature {NONE} -- Initialization make is -- Create. do test_workers end feature -- Testcases test_workers is -- Test JOB_QUEUE and WORKER_POOL. local l_jq: JOB_QUEUE l_wp: WORKER_POOL i: NATURAL do create l_jq.make create l_wp.make (10, l_jq) -- add some jobs from i := 0 until i > 30 loop l_jq.force (agent print (i.out+"%N")) i := i + 1 end -- start workers l_wp.start -- add some jobs again from i := 100 until i > 130 loop if i = 110 then l_jq.join_jobs_for_tag ("second") print ("Jobs 100-109 finished%N") end l_jq.force_with_tag (agent print (i.out+"%N"), "second") i := i + 1 end l_jq.join_jobs print ("Jobs 0-30, 100-130 (all) finished%N") -- stop workers l_wp.stop -- add some jobs again (should no get executed) from i := 200 until i > 230 loop l_jq.force (agent print (i.out+"%N")) i := i + 1 end end end