protobuf-nats 0.13.0.pre0 → 0.13.0.pre1

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
  SHA256:
3
- metadata.gz: 34ffc46779be7a7549af169386c7212ed7210997dba1c1af19326a10aa92f98f
4
- data.tar.gz: 9ca966e67099fc4332bcd4dc9270032f0238cf8afa7f18cb57a6c81e4307ed6e
3
+ metadata.gz: 4b7aca0b48165949df0d4bf25caaf232c6fa0b27f8e56337731a155bab46526f
4
+ data.tar.gz: 7d6b68fcdc13f8561fa9d8f20c8c90049df3535ca70532265fbabcaa97ed243d
5
5
  SHA512:
6
- metadata.gz: 4d11137ae46ebfe8a1f003fda41aeba78d4a23893efafb38ad803969ba44df594dd3b0d0b5289e6bface579458baea1327749919f92ecbbbf6e3acbd2235c020
7
- data.tar.gz: 5f6b0a643ea4d85063232800dff9fefba05ac70b8787666253244afa474f8314ae6de67b2f10efb970884c47150ce404a78dbf9d18b8ac425727f2172196f836
6
+ metadata.gz: 0ce6f5d3599b7c62ce1e6b518108ccb0e32b8c913ecdb3a21a0c43a4a71f1636407d07432ae49a615c4e98f7104dad82de86001bc20f48d8c657e4fab926af88
7
+ data.tar.gz: 739ec4501bcfcd5080c000abfc4cec9eaf0ae33ae906f5bb63d259e4e473176a82123a39f5c396f0ae1190c1b548c0cf402de1f9edc4454b43e6c10f6bfb416a
@@ -125,6 +125,13 @@ module Protobuf
125
125
  @restarting = true
126
126
  end
127
127
 
128
+ # Yield so other restart callers spawned around the same time get a
129
+ # chance to reach the @restarting check above and skip. Without this,
130
+ # CRuby's GVL can let the current thread run the entire restart to
131
+ # completion (clearing @restarting) before sibling threads even enter
132
+ # the method, defeating the concurrent-restart guard.
133
+ Thread.pass
134
+
128
135
  begin
129
136
  # Stop the existing muxer first, if it's running
130
137
  LOCK.synchronize do
@@ -358,7 +365,6 @@ module Protobuf
358
365
 
359
366
  @cleanup_mutex.synchronize { @shutdown = false }
360
367
  @cleanup_thread = Thread.new do
361
- Thread.current.name = "response-muxer-cleanup-#{object_id}"
362
368
  begin
363
369
  loop do
364
370
  # Wait for 60 seconds or until signaled to shutdown
@@ -380,6 +386,10 @@ module Protobuf
380
386
  ::Protobuf::Nats.notify_error_callbacks(fatal_error)
381
387
  end
382
388
  end
389
+ # Name the thread from the outside so the name is visible to callers
390
+ # immediately after start_cleanup_thread returns (no race with the
391
+ # thread body executing).
392
+ @cleanup_thread.name = "response-muxer-cleanup-#{object_id}"
383
393
  end
384
394
 
385
395
  def stop_cleanup_thread
@@ -1,5 +1,5 @@
1
1
  module Protobuf
2
2
  module Nats
3
- VERSION = "0.13.0.pre0"
3
+ VERSION = "0.13.0.pre1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf-nats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0.pre0
4
+ version: 0.13.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Dewitt