weel 1.99.110 → 1.99.112
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 +9 -6
- 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: 9fa3ffb360459331eeb431e4ec33bfd96406c5086df62a7b6473b6745d7972f4
|
4
|
+
data.tar.gz: 7e7e29b38cb07c85acff75b73808e362683066ef0baecf269ee20dde1d8006a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2245be8b63155486e13b69bee90cc074820f1e8cf95e4757f5d163edc2a1541d4c3560737eebd8ba9e790d02677781e89cd8d428e5ea2c1605e5d07d014ae889
|
7
|
+
data.tar.gz: 99a6c0666409e7ba2b1e8af6939a62bbbef140119aafe767efd7a8f7bdda3908eceb30b2b67e206ef11406c4ddc8752bf9869b6a4792b0ef7ac2b2a06e081111
|
data/lib/weel.rb
CHANGED
@@ -354,7 +354,7 @@ class WEEL
|
|
354
354
|
def callback(result=nil,options={}); end
|
355
355
|
def mem_guard; end
|
356
356
|
|
357
|
-
def test_condition(mr,code); mr.instance_eval(code); end
|
357
|
+
def test_condition(mr,code,args={}); mr.instance_eval(code); end
|
358
358
|
def join_branches(branches); end
|
359
359
|
def manipulate(mr,code,where,result=nil,options=nil); mr.instance_eval(code,where,1); end
|
360
360
|
end # }}}
|
@@ -632,7 +632,7 @@ class WEEL
|
|
632
632
|
Thread.current[:mutex].synchronize do
|
633
633
|
return if Thread.current[:alternative_mode][-1] == :exclusive && Thread.current[:alternative_executed][-1] == true
|
634
634
|
if (condition.is_a?(String) || condition.is_a?(Proc)) && !__weel_sim
|
635
|
-
condition = __weel_eval_condition(condition)
|
635
|
+
condition = __weel_eval_condition(condition, args)
|
636
636
|
end
|
637
637
|
Thread.current[:alternative_executed][-1] = true if condition
|
638
638
|
end
|
@@ -692,7 +692,7 @@ class WEEL
|
|
692
692
|
catch :escape do
|
693
693
|
case condition[1]
|
694
694
|
when :pre_test
|
695
|
-
while __weel_eval_condition(condition[0]) && self.__weel_state != :stopping && self.__weel_state != :stopped && self.__weel_state != :finishing && !Thread.current[:nolongernecessary]
|
695
|
+
while __weel_eval_condition(condition[0],args) && self.__weel_state != :stopping && self.__weel_state != :stopped && self.__weel_state != :finishing && !Thread.current[:nolongernecessary]
|
696
696
|
loop_guard += 1
|
697
697
|
__weel_protect_yield(&block)
|
698
698
|
sleep 1 if @__weel_connectionwrapper::loop_guard(@__weel_connectionwrapper_args,loop_id,loop_guard)
|
@@ -702,7 +702,7 @@ class WEEL
|
|
702
702
|
loop_guard += 1
|
703
703
|
__weel_protect_yield(&block)
|
704
704
|
sleep 1 if @__weel_connectionwrapper::loop_guard(@__weel_connectionwrapper_args,loop_id,loop_guard)
|
705
|
-
end while __weel_eval_condition(condition[0]) && self.__weel_state != :stopping && self.__weel_state != :stopped && self.__weel_state != :finishing && !Thread.current[:nolongernecessary]
|
705
|
+
end while __weel_eval_condition(condition[0],args) && self.__weel_state != :stopping && self.__weel_state != :stopped && self.__weel_state != :finishing && !Thread.current[:nolongernecessary]
|
706
706
|
end
|
707
707
|
end
|
708
708
|
end # }}}
|
@@ -768,10 +768,10 @@ class WEEL
|
|
768
768
|
end
|
769
769
|
end #}}}
|
770
770
|
|
771
|
-
def __weel_eval_condition(condition) #{{{
|
771
|
+
def __weel_eval_condition(condition,args={}) #{{{
|
772
772
|
begin
|
773
773
|
connectionwrapper = @__weel_connectionwrapper.new @__weel_connectionwrapper_args unless condition.is_a?(Proc)
|
774
|
-
condition.is_a?(Proc) ? condition.call : connectionwrapper.test_condition(ReadStructure.new(@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional),condition)
|
774
|
+
condition.is_a?(Proc) ? condition.call : connectionwrapper.test_condition(ReadStructure.new(@__weel_data,@__weel_endpoints,Thread.current[:local],connectionwrapper.additional),condition,args)
|
775
775
|
rescue NameError => err # don't look into it, or it will explode
|
776
776
|
# if you access $! here, BOOOM
|
777
777
|
self.__weel_state = :stopping
|
@@ -895,6 +895,9 @@ class WEEL
|
|
895
895
|
@__weel_connectionwrapper::inform_position_change @__weel_connectionwrapper_args, :wait => [wp]
|
896
896
|
end
|
897
897
|
begin
|
898
|
+
# cleanup after callback updates
|
899
|
+
connectionwrapper.mem_guard
|
900
|
+
|
898
901
|
# with loop if catching Signal::Again
|
899
902
|
# handshake call and wait until it finished
|
900
903
|
waitingresult = nil
|
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.112
|
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: 2023-
|
12
|
+
date: 2023-10-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: test-unit
|