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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5db3c21f13dc0df286986a4e2ceec9e33834848a
4
- data.tar.gz: 948761b61c3c11a2c7d2541aa3654bbc4e998e51
2
+ SHA256:
3
+ metadata.gz: dba24fe177cfa2ac236c6ceaed731d0b9d9f55720a9cf092a7c3501335c8d879
4
+ data.tar.gz: 5e57ed6e6afa49e937df80f66c1dcc09ff4dd41a41e51dd5bec913fd93a52e15
5
5
  SHA512:
6
- metadata.gz: 9298044fbf2a923f9c64aa49a3635841d10e5338e2d19c291efa2a63f06abdff0f5ca4ab42e4b15399614d2662f6d08ef80cfac38d191dc0e4cb487b4e0f446e
7
- data.tar.gz: 987ea2885d368e74ca5d4d228f78cbbe6a44f05ac8691b98cb5d35a041333f7e7b927333f8ec501ab0c9f68de442f17e758b7ac0f915cd893ede87dc3e68f942
6
+ metadata.gz: a64c0d26233c4fda27dd86145fc5a7055c88716551aec493d48530f311d5cd3825fb1a904e5c91055ea21daf0bdaeaca3a8b6227fa58721014e9f79abc5df3ce
7
+ data.tar.gz: d2283694042fc1cc619bae2a0c05b64508a69de94f4b861460d2ffcfb79414d02663881793759e8592e63312ee00b9b426ee03fe438122e6cc5a5ee3025322f5
@@ -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
- Thread.exclusive do
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'
@@ -7,7 +7,7 @@ module OnStomp
7
7
  # Minor / feature version
8
8
  MINOR = 0
9
9
  # Patch version
10
- PATCH = 10
10
+ PATCH = 11
11
11
  # Complete version
12
12
  VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
13
13
  end
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.10
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-06-26 00:00:00.000000000 Z
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.4.5
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.