ntl-actor 1.1.4 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/actor/messaging/address.rb +2 -2
- data/lib/actor/messaging/address/dependency.rb +1 -1
- data/lib/actor/messaging/address/substitute.rb +12 -2
- data/lib/actor/messaging/publish/substitute.rb +1 -1
- data/lib/actor/messaging/queue/substitute.rb +8 -0
- data/lib/actor/messaging/send.rb +3 -3
- data/lib/actor/messaging/send/substitute.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0eb90ff1326259da5859f3d9c5554d953f4a300
|
4
|
+
data.tar.gz: a95d5e65f84f0d285bfc2877ac180e0122636b91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47f864cd3c19ebf1016ee5a39f96734542df7f736da58cb46d8c25d67e1f53a61b7459dd2063d7a909681e47e15b40b8c623fb7388ea77da646d66cfc3577039
|
7
|
+
data.tar.gz: 253b782b66bb020c92d5256445326fcaf07ca005e5d61c1bb6165275804e2979641f1e5dce743dcc9056fe5399e997e081cb3b97fe595dfb47d7a7df14f6e9b9
|
@@ -1,9 +1,19 @@
|
|
1
1
|
module Actor
|
2
2
|
module Messaging
|
3
3
|
class Address
|
4
|
-
|
4
|
+
class Substitute < None
|
5
5
|
def self.build
|
6
|
-
|
6
|
+
instance = super
|
7
|
+
instance.extend Controls
|
8
|
+
instance
|
9
|
+
end
|
10
|
+
|
11
|
+
def queue_depth
|
12
|
+
@queue_depth ||= super
|
13
|
+
end
|
14
|
+
|
15
|
+
module Controls
|
16
|
+
attr_writer :queue_depth
|
7
17
|
end
|
8
18
|
end
|
9
19
|
end
|
data/lib/actor/messaging/send.rb
CHANGED
@@ -2,7 +2,7 @@ module Actor
|
|
2
2
|
module Messaging
|
3
3
|
class Send
|
4
4
|
def call message, address, wait: nil
|
5
|
-
non_block = wait
|
5
|
+
non_block = !wait
|
6
6
|
|
7
7
|
queue = address.queue
|
8
8
|
|
@@ -13,11 +13,11 @@ module Actor
|
|
13
13
|
begin
|
14
14
|
queue.enq message, non_block
|
15
15
|
rescue ThreadError
|
16
|
-
raise
|
16
|
+
raise QueueFullError
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
QueueFullError = Class.new StandardError
|
21
21
|
|
22
22
|
def self.call *arguments
|
23
23
|
instance = new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ntl-actor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Ladd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Implementation of actor pattern for ruby
|
14
14
|
email: nathanladd+github@gmail.com
|