onstomp 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/onstomp.rb +12 -3
- data/lib/onstomp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dba24fe177cfa2ac236c6ceaed731d0b9d9f55720a9cf092a7c3501335c8d879
|
4
|
+
data.tar.gz: 5e57ed6e6afa49e937df80f66c1dcc09ff4dd41a41e51dd5bec913fd93a52e15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a64c0d26233c4fda27dd86145fc5a7055c88716551aec493d48530f311d5cd3825fb1a904e5c91055ea21daf0bdaeaca3a8b6227fa58721014e9f79abc5df3ce
|
7
|
+
data.tar.gz: d2283694042fc1cc619bae2a0c05b64508a69de94f4b861460d2ffcfb79414d02663881793759e8592e63312ee00b9b426ee03fe438122e6cc5a5ee3025322f5
|
data/lib/onstomp.rb
CHANGED
@@ -85,7 +85,9 @@ module OnStomp
|
|
85
85
|
|
86
86
|
# Raised by ThreadedReceiver to stop the receiving thread.
|
87
87
|
class StopReceiver < StandardError; end
|
88
|
-
|
88
|
+
|
89
|
+
@mutex = Thread::Mutex.new
|
90
|
+
|
89
91
|
class << self
|
90
92
|
# Creates a new connection and immediately connects it to the broker.
|
91
93
|
# @see #initialize
|
@@ -113,12 +115,12 @@ module OnStomp
|
|
113
115
|
new_hash
|
114
116
|
end
|
115
117
|
end
|
116
|
-
|
118
|
+
|
117
119
|
# Generates the next serial number in a thread-safe manner. This method
|
118
120
|
# merely initializes an instance variable to 0 if it has not been set,
|
119
121
|
# then increments this value and returns its string representation.
|
120
122
|
def next_serial(prefix=nil)
|
121
|
-
|
123
|
+
mutex.synchronize do
|
122
124
|
@next_serial_sequence ||= 0
|
123
125
|
@next_serial_sequence += 1
|
124
126
|
@next_serial_sequence.to_s
|
@@ -141,6 +143,13 @@ module OnStomp
|
|
141
143
|
const.const_missing(named)
|
142
144
|
end
|
143
145
|
end
|
146
|
+
|
147
|
+
private
|
148
|
+
|
149
|
+
def mutex
|
150
|
+
@mutex
|
151
|
+
end
|
152
|
+
|
144
153
|
end
|
145
154
|
end
|
146
155
|
require 'onstomp/version'
|
data/lib/onstomp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onstomp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian D. Eccles
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
222
222
|
version: '0'
|
223
223
|
requirements: []
|
224
224
|
rubyforge_project: onstomp-core
|
225
|
-
rubygems_version: 2.
|
225
|
+
rubygems_version: 2.7.6
|
226
226
|
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: Client for message queues implementing the Stomp protocol interface.
|