weel 1.99.89 → 1.99.90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/weel.rb +15 -0
  3. data/weel.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51411a60466b7ea131d02acbd61604a59b6b4e9fb967a332994c05b29f1fd9ee
4
- data.tar.gz: 8d46c4fcf72ca24891af272e42ae2d57ce478e6c6b3a08c47c0b6d396d6b2cb0
3
+ metadata.gz: d75c73b084f3926403dc8938f27a1295d7a36d7ccd2299f5eff2af075808da24
4
+ data.tar.gz: d3d5d52b613217a031392c740442bbe6a6d16d64b38b668dca8d15035a86a078
5
5
  SHA512:
6
- metadata.gz: '09eafb6debb82a7074aee19dc19be90d8a29af8dd1209d8a9475097126e6feefc66f8412cd6cb909c0652e7cd3fe5b50327e5ecc21cabc12f244846ffbc33e43'
7
- data.tar.gz: 4128bfe0ce21234534afdc05069ce3b42c8cff7a384bd6ac938c992f9d418534d224ae2f29a38cc932e4c5df99346907324cd74e8c9b6562315b2e8b097636f0
6
+ metadata.gz: 710def978b14664c463ea6e87bb88179b2cc2aa01429fa908142b202b75e2ea8831eacd663573252ec5ff9e0dd54e534b965c5033dc68dc675aa3fe7543a32ca
7
+ data.tar.gz: 34d4be7d47e4c2ffd243fb1d216c98387de56058dc20bb827085d56dc3e3f08899f1b7bd9ee9d67d39e418ce2b0907f4ccf901ef0484f6d2940d2565bc5ba285
@@ -15,6 +15,7 @@
15
15
  # <http://www.gnu.org/licenses/>.
16
16
 
17
17
  require 'thread'
18
+ require 'securerandom'
18
19
 
19
20
  class WEEL
20
21
  def initialize(*args)# {{{
@@ -237,6 +238,7 @@ class WEEL
237
238
  end # }}}
238
239
 
239
240
  class HandlerWrapperBase # {{{
241
+ def self::loop_guard(lid,count); false; end
240
242
  def self::inform_state_change(arguments,newstate); end
241
243
  def self::inform_syntax_error(arguments,err,code); end
242
244
  def self::inform_handlerwrapper_error(arguments,err); end
@@ -297,6 +299,12 @@ class WEEL
297
299
  def to_json(*args)
298
300
  as_json.to_json(*args)
299
301
  end
302
+ def eql?(other)
303
+ to_s == other.to_s
304
+ end
305
+ def hash
306
+ to_s.hash
307
+ end
300
308
  end # }}}
301
309
 
302
310
  class Continue # {{{
@@ -584,15 +592,21 @@ class WEEL
584
592
  __weel_sim_stop(:loop,hw,pos,args.merge(:testing=>condition[1],:condition=>cond))
585
593
  return
586
594
  end
595
+ loop_guard = 0
596
+ loop_id = SecureRandom.uuid
587
597
  catch :escape do
588
598
  case condition[1]
589
599
  when :pre_test
590
600
  while __weel_eval_condition(condition[0]) && self.__weel_state != :stopping && self.__weel_state != :stopped && self.__weel_state != :finishing
601
+ loop_guard += 1
591
602
  __weel_protect_yield(&block)
603
+ sleep 1 if @__weel_handlerwrapper::loop_guard(@__weel_handlerwrapper_args,loop_id,loop_guard)
592
604
  end
593
605
  when :post_test
594
606
  begin
607
+ loop_guard += 1
595
608
  __weel_protect_yield(&block)
609
+ sleep 1 if @__weel_handlerwrapper::loop_guard(@__weel_handlerwrapper_args,loop_id,loop_guard)
596
610
  end while __weel_eval_condition(condition[0]) && self.__weel_state != :stopping && self.__weel_state != :stopped && self.__weel_state != :finishing
597
611
  end
598
612
  end
@@ -688,6 +702,7 @@ class WEEL
688
702
  ipc[:unmark] << ele
689
703
  true
690
704
  end
705
+ ipc[:unmark].uniq!
691
706
 
692
707
  @__weel_positions << wp
693
708
  Thread.current[:branch_position] = wp
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "weel"
3
- s.version = "1.99.89"
3
+ s.version = "1.99.90"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "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.89
4
+ version: 1.99.90
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-23 00:00:00.000000000 Z
12
+ date: 2020-09-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit