pipe_rpc 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pipe_rpc/error.rb +1 -0
- data/lib/pipe_rpc/hub.rb +5 -0
- data/lib/pipe_rpc/version.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: 18da7ab63c5db5dadb670d249f530c7b41ccdb77
|
4
|
+
data.tar.gz: e3f1f5fabb90effabc295016f82093da576ae1bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ee202c6f37fd1f347fb2353e11c76e7b28493c9ee55a5f734e77aab933edbb4c419289036237d8b2be8c6a9dc2b1f225732cb5ec52d5db7bacb19540fccb96f
|
7
|
+
data.tar.gz: 62abb7205dba1a4accf5d90e98cf6e2e67bb6c4ba8517c40519b8e2a8f965373f9cb17e3c4ed1d8fcc142f960d9abab79c1c1a575bf00c3eac4f6aff2a36e923
|
data/lib/pipe_rpc/error.rb
CHANGED
data/lib/pipe_rpc/hub.rb
CHANGED
@@ -54,6 +54,10 @@ module PipeRpc
|
|
54
54
|
@socket.write @requester.notification(signature)
|
55
55
|
end
|
56
56
|
|
57
|
+
def cancel
|
58
|
+
@canceled = true
|
59
|
+
end
|
60
|
+
|
57
61
|
def request(signature, &on_result)
|
58
62
|
result = nil
|
59
63
|
result_ready = false
|
@@ -65,6 +69,7 @@ module PipeRpc
|
|
65
69
|
@socket.write request
|
66
70
|
|
67
71
|
loop do
|
72
|
+
raise CanceledError.new if @canceled
|
68
73
|
return result if result_ready
|
69
74
|
@loop_iteration ? @loop_iteration.call : handle_message
|
70
75
|
end
|
data/lib/pipe_rpc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipe_rpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Aue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|