standard-procedure-plumbing 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/plumbing/actor/rails.rb +2 -2
- data/lib/plumbing/actor/threaded.rb +10 -9
- data/lib/plumbing/version.rb +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: 95f2fc92882bb116a50fb4406b8d905b6783bfd0b2f74a4229162fd26a920668
|
4
|
+
data.tar.gz: a0db08496ca520d9ae6baf50495395b3f943869cc07105b8d5ef7cefc054f8bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 976815454b96a52880605f34fc7d7ae801259bedaa7807c148f9edc951e9e8766d35e9cc0988d2f572aa7076bf78e9b90a666468b1438b0b80abe6cb3e3d9947
|
7
|
+
data.tar.gz: 6c9852305cf8ac858d853cdeac89c57c3424838d5ee51a130a989210ffdd8337d393dd710f61d8cf0a3212f4027383840c7919e44d61c6c86e8bfb9af53eac8f
|
data/lib/plumbing/actor/rails.rb
CHANGED
@@ -18,10 +18,8 @@ module Plumbing
|
|
18
18
|
# Send the message to the target and wrap the result
|
19
19
|
def send_message(message_name, *args, **params, &block)
|
20
20
|
Message.new(@target, message_name, Plumbing::Actor.transporter.marshal(*args, **params), block, Concurrent::MVar.new).tap do |message|
|
21
|
-
@
|
22
|
-
|
23
|
-
send_messages if @queue.any?
|
24
|
-
end
|
21
|
+
@queue << message
|
22
|
+
send_messages
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
@@ -38,15 +36,18 @@ module Plumbing
|
|
38
36
|
|
39
37
|
protected
|
40
38
|
|
41
|
-
def
|
39
|
+
def in_context(&)
|
40
|
+
Concurrent::Promises.future do
|
41
|
+
@mutex.synchronize(&)
|
42
|
+
end
|
43
|
+
end
|
42
44
|
|
43
45
|
private
|
44
46
|
|
45
47
|
def send_messages
|
46
|
-
|
47
|
-
@
|
48
|
-
message
|
49
|
-
message&.call
|
48
|
+
in_context do
|
49
|
+
while (message = @queue.shift)
|
50
|
+
message.call
|
50
51
|
end
|
51
52
|
end
|
52
53
|
end
|
data/lib/plumbing/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standard-procedure-plumbing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rahoul Baruah
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
|
-
rubygems_version: 3.5.
|
99
|
+
rubygems_version: 3.5.12
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Plumbing - various pipelines for your ruby application
|