On 9/2/07, Liwen <[EMAIL PROTECTED]> wrote: > > Hi, > > I wonder what the correct Ruby syntax for openwfe to run jobs in > concurrence? I have the following test code: > > class TheProcessDefinition0 < OpenWFE::ProcessDefinition > def make > process_definition :name => "test", :revision => "0" do > concurrence do > participant :aaa > participant :bbb > end > end > end > end > > But bbb never runs unless aaa finishes. I assume this defintion > makes aaa and bbb run in separate threads.
Hi Liwen, to be sure, I wrote that test : ( http://openwferu.rubyforge.org/svn/trunk/openwfe-ruby/test/concurrence_test.rb ) ---8<--- class Hpc0 < ProcessDefinition concurrence do participant :alice participant :bob end end def test_hpc_0 @hpAlice = HashParticipant.new @hpBob = HashParticipant.new @engine.register_participant(:alice, @hpAlice) @engine.register_participant(:bob, @hpBob) @engine.launch(Hpc0) sleep 0.500 assert_equal @hpAlice.size, 1 assert_equal @hpBob.size, 1 end --->8--- which works fine (with OpenWFEru trunk, but it should work as fine with OpenWFEru 0.9.13). Sorry. Best regards, -- John Mettraux -///- http://jmettraux.openwfe.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "OpenWFEru dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/openwferu-dev?hl=en -~----------~----~----~----~------~----~------~--~---
