0mq 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/0mq/poll_interruptible.rb +8 -7
- 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: ef320e7c2d43b2cd9c7bb4222e128d4ae60a4105
|
4
|
+
data.tar.gz: a0a775f59dd263ef24678183ca8159244e61f0bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82fed431aa6fd8431a4154512d6f37af67f219227de66b84bd19c9ecdcc8e0ef6b6396678d3ccf18ca6a29bf4169ad642c9d00e2be75affe54cbd7be5cbc5f2d
|
7
|
+
data.tar.gz: b00911b0781281ac79262fa415b31f9ffda7f0f7978772d47c8612a9f74714987492b6f70c9b0decc47afe83488b7ec8c05851e14b8d62ae651482c544e5d7f0
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ _Works like ZeroMQ. Feels like Ruby._
|
|
4
4
|
[![Build Status](https://travis-ci.org/jemc/0mq.png)](https://travis-ci.org/jemc/0mq)
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/0mq.png)](http://badge.fury.io/rb/0mq)
|
6
6
|
|
7
|
-
|
7
|
+
The 0mq gem is a Ruby wrapper for the ZeroMQ (libzmq) API. Built on ffi-rzmq-core, the bridge from Ruby to ZeroMQ’s C API, the 0mq gem conceals the interaction with FFI and exposes an interface that uses blocks, raises exceptions, and feels like the Ruby we love to use.
|
8
8
|
|
9
9
|
## Supported
|
10
10
|
|
@@ -8,11 +8,14 @@ module ZMQ
|
|
8
8
|
# Note that either #kill or #close MUST be called when done with the object.
|
9
9
|
# There is no automatic finalizer for this object.
|
10
10
|
def initialize(*sockets)
|
11
|
-
@
|
12
|
-
@
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
@int_sock_rep = ZMQ::Socket.new ZMQ::REP
|
12
|
+
@int_sock_req = ZMQ::Socket.new ZMQ::REQ
|
13
|
+
|
14
|
+
# Choose an endpoint name that we can expect to be unique
|
15
|
+
# so that they can be shared within the DefaultContext
|
16
|
+
int_endpoint = "inproc://__PollInterruptible_int_"+hash.to_s(26)
|
17
|
+
@int_sock_rep.bind int_endpoint
|
18
|
+
@int_sock_req.connect int_endpoint
|
16
19
|
|
17
20
|
@dead = false
|
18
21
|
|
@@ -59,7 +62,6 @@ module ZMQ
|
|
59
62
|
@int_sock_req.send_array ["KILL"]
|
60
63
|
@int_sock_req.recv_array
|
61
64
|
@int_sock_req.close
|
62
|
-
@int_context.terminate
|
63
65
|
|
64
66
|
@dead = true
|
65
67
|
end
|
@@ -73,7 +75,6 @@ module ZMQ
|
|
73
75
|
|
74
76
|
@int_sock_rep.close
|
75
77
|
@int_sock_req.close
|
76
|
-
@int_context.terminate
|
77
78
|
|
78
79
|
@dead = true
|
79
80
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: 0mq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe McIlvain
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi-rzmq-core
|