0mq 0.4.0 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed94fa721edb7ba1b1406ec9c7601528e7f425c2
4
- data.tar.gz: b982fa07e6efe22051a8a9789857dce377deaf5f
3
+ metadata.gz: ef320e7c2d43b2cd9c7bb4222e128d4ae60a4105
4
+ data.tar.gz: a0a775f59dd263ef24678183ca8159244e61f0bc
5
5
  SHA512:
6
- metadata.gz: 3e02444d6b525dba0d7acaa03afae14f89ba49e956dc1e4d110190abed9c2c1739a06ca895a4ca605a9b174d3c444ffa6bf572bf617aa13887d5b44a8b78701e
7
- data.tar.gz: dec5b627b739c246c233d70a05574c3e32bdd678054fb3885ccbe63f906ff1a7b6e65a040d256141b8d6f04e573c382044f608d85a77b31c372a750360034cbd
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
- A Ruby-like wrapper for ffi-rzmq-core (ZeroMQ)
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
- @int_context = ZMQ::Context.new
12
- @int_sock_rep = ZMQ::Socket.new ZMQ::REP, context:@int_context
13
- @int_sock_req = ZMQ::Socket.new ZMQ::REQ, context:@int_context
14
- @int_sock_rep.bind "inproc://int"
15
- @int_sock_req.connect "inproc://int"
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.0
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-11 00:00:00.000000000 Z
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