weel 1.99.97 → 1.99.98
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weel.rb +23 -2
- data/weel.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e82bd07a1a46e7456badf0f68f51b61ce8185c4292590e2c3113e3dcef9b23b
|
4
|
+
data.tar.gz: a8e5dc3301a874267a5742395816501d778c2b7ccd934590c55e28410c34994e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b37432797796439fcff05c476d09f1c3f7ee388f01a83e593c9db8fcb7bc57f413f5809f0a48c31b2ba04f146928ec236a87e6e5e1ca78a487c7eccbfcb82a2
|
7
|
+
data.tar.gz: be8e00b7a57362406dfd61d9c84d53ad2451f7219c535c0a2e4562eedd527dba6ca50c32a735e8d898e959eeb6ac9e120ab9e6507f476dfebe9e96cbaa22d60f
|
data/lib/weel.rb
CHANGED
@@ -417,7 +417,9 @@ class WEEL
|
|
417
417
|
|
418
418
|
__weel_protect_yield(&block)
|
419
419
|
|
420
|
-
Thread.current[:branch_wait_count] = (type.is_a?(Hash) && type
|
420
|
+
Thread.current[:branch_wait_count] = (type.is_a?(Hash) && type[:wait] != nil && (type[:wait].is_a?(Integer) && type[:wait] > 0) ? type[:wait] : Thread.current[:branches].size)
|
421
|
+
Thread.current[:branch_wait_count_cancel] = 0
|
422
|
+
Thread.current[:branch_wait_count_cancel_condition] = (type.is_a?(Hash) && type[:cancel] != nil && type[:cancel] == :first ) ? :first : :last
|
421
423
|
1.upto Thread.current[:branches].size do
|
422
424
|
Thread.current[:branch_event].wait
|
423
425
|
end
|
@@ -460,11 +462,12 @@ class WEEL
|
|
460
462
|
current_branch_sim_pos = branch_parent[:branch_sim_pos]
|
461
463
|
end
|
462
464
|
|
463
|
-
|
465
|
+
branch_parent[:branches] << Thread.new(*vars) do |*local|
|
464
466
|
Thread.current.abort_on_exception = true
|
465
467
|
Thread.current[:branch_status] = false
|
466
468
|
Thread.current[:branch_parent] = branch_parent
|
467
469
|
Thread.current[:start_event] = Continue.new
|
470
|
+
Thread.current[:branch_wait_count_cancel_active] = false
|
468
471
|
|
469
472
|
if __weel_sim
|
470
473
|
Thread.current[:branch_sim_pos] = @__weel_sim += 1
|
@@ -872,6 +875,24 @@ class WEEL
|
|
872
875
|
self.__weel_state = :stopping
|
873
876
|
ensure
|
874
877
|
handlerwrapper.mem_guard unless handlerwrapper.nil?
|
878
|
+
if Thread.current[:branch_parent]
|
879
|
+
Thread.current[:branch_parent][:mutex].synchronize do
|
880
|
+
if Thread.current[:branch_parent][:branch_wait_count_cancel_condition] == :first
|
881
|
+
if !Thread.current[:branch_wait_count_cancel_active]
|
882
|
+
Thread.current[:branch_wait_count_cancel_active] = true
|
883
|
+
Thread.current[:branch_parent][:branch_wait_count_cancel] += 1
|
884
|
+
end
|
885
|
+
if Thread.current[:branch_parent][:branch_wait_count_cancel] == Thread.current[:branch_parent][:branch_wait_count] && self.__weel_state != :stopping && self.__weel_state != :finishing
|
886
|
+
Thread.current[:branch_parent][:branches].each do |thread|
|
887
|
+
if thread.alive? && thread != Thread.current
|
888
|
+
thread[:nolongernecessary] = true
|
889
|
+
__weel_recursive_continue(thread)
|
890
|
+
end
|
891
|
+
end
|
892
|
+
end
|
893
|
+
end
|
894
|
+
end
|
895
|
+
end
|
875
896
|
Thread.current[:continue].clear if Thread.current[:continue] && Thread.current[:continue].is_a?(Continue)
|
876
897
|
end
|
877
898
|
end # }}}
|
data/weel.gemspec
CHANGED
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.
|
4
|
+
version: 1.99.98
|
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: 2021-05-
|
12
|
+
date: 2021-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|