weel 1.99.7 → 1.99.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/weel.rb CHANGED
@@ -241,8 +241,8 @@ class WEEL
241
241
  !@q.empty?
242
242
  end
243
243
  end
244
- def continue
245
- @q.push nil
244
+ def continue(what=nil)
245
+ @q.push what
246
246
  end
247
247
  def clear
248
248
  @q.clear
@@ -621,15 +621,13 @@ class WEEL
621
621
 
622
622
  passthrough = @__weel_search_positions[position] ? @__weel_search_positions[position].passthrough : nil
623
623
  begin
624
- # with loop if catch Signal::Again
625
- begin
626
- # handshake call and wait until it finished
627
- handlerwrapper.activity_handle passthrough, params
628
- Thread.current[:continue].wait unless Thread.current[:nolongernecessary] || self.__weel_state == :stopping || self.__weel_state == :stopped
629
- again = false
630
- rescue Signal::Again
631
- again = true
632
- end
624
+ # with loop if catching Signal::Again
625
+ # handshake call and wait until it finished
626
+
627
+ handlerwrapper.activity_handle passthrough, params
628
+ waitingresult = nil
629
+ waitingresult = Thread.current[:continue].wait unless Thread.current[:nolongernecessary] || self.__weel_state == :stopping || self.__weel_state == :stopped
630
+ raise waitingresult if !waitingresult.nil? && waitingresult.is_a?(Signal::Again)
633
631
 
634
632
  if Thread.current[:nolongernecessary]
635
633
  handlerwrapper.activity_no_longer_necessary
@@ -661,7 +659,7 @@ class WEEL
661
659
  (mr.changed_endpoints.any? ? mr.changed_endpoints.uniq : nil)
662
660
  )
663
661
  end
664
- end while wp.passthrough.nil? && again
662
+ end while wp.passthrough.nil? && waitingresult == Signal::Again
665
663
  if wp.passthrough.nil?
666
664
  handlerwrapper.inform_activity_done
667
665
  wp.detail = :after
@@ -19,7 +19,7 @@ class TestHandlerWrapper < WEEL::HandlerWrapperBase
19
19
  if @__myhandler_endpoint == 'again'
20
20
  @__myhandler_returnValue = parameters.has_key?(:result) ? parameters[:result] : 'Handler_Dummy_Result'
21
21
  if parameters[:call].call
22
- raise WEEL::Signal::Again
22
+ @__myhandler_continue.continue WEEL::Signal::Again
23
23
  else
24
24
  @__myhandler_continue.continue
25
25
  end
data/weel.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "weel"
3
- s.version = "1.99.7"
3
+ s.version = "1.99.8"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3"
6
6
  s.summary = "Preliminary release of the Workflow Execution Engine Library (WEEL)"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.99.7
4
+ version: 1.99.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-04-02 00:00:00.000000000 Z
13
+ date: 2014-04-03 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: see http://cpee.org
16
16
  email: juergen.mangler@gmail.com