local_bus 0.1.1 → 0.1.2

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: fa03fc7b7c1f5e14bff852435b75e343f150ceee9b5f9638ce365918bc39c939
4
- data.tar.gz: 1aa8d5ffa9895245ff78f1b00c2d4f3697a1183afe82dc4bcd3d7c420453e924
3
+ metadata.gz: 3abe4359b671f5e051a9e3b4e2cb0ac73ca9c00ef63c1622c158ebf4c116a1b5
4
+ data.tar.gz: 408ea743c2b5b8d3a000a8db5b8207f6e3d90edfb3976b8bf1aad3ec11dde8ab
5
5
  SHA512:
6
- metadata.gz: 6e17c54a44652eac0c7edb7715a1db68507a0b82b4c3acdd9bfbc4e41d5741b5b80965d623be8e369c4080e43a0cb8696431d6464588655ecc863c47d8bf81e6
7
- data.tar.gz: 57fbbe8719669a3dbee59252c2d71ce20c1ce232110779ffa9bf8fa4c68e7da1b59cb9fb916d308c7e8d21e499117eb74b4a5e464db2c0eab2866e53855d9c12
6
+ metadata.gz: de71a197041a072f69ad37e971663983da3f77a00889c71afc622d382e74480bf5bef25ebfdc5d97762d4a15f385b0d63bdd929f67c6e455dc378340d3afda93
7
+ data.tar.gz: fe165204058f9e5f9df6aa00d4f3d07db69478eeca3232a7204be758e0b6418800e903c576c927b04b0a958946e729c385a27341bb1f9168bcb2cb83198396db
@@ -99,6 +99,8 @@ class LocalBus
99
99
 
100
100
  @pool = nil
101
101
  end
102
+ rescue
103
+ nil # ignore errors during shutdown
102
104
  end
103
105
 
104
106
  # Clean up shutdown handler
@@ -213,9 +215,9 @@ class LocalBus
213
215
  # @rbs on: Array[String] -- signals to trap
214
216
  # @rbs return: void
215
217
  def enable_safe_shutdown(on:)
218
+ at_exit { stop }
216
219
  on.each do |signal|
217
220
  trap signal do
218
- # Only queue the signal if we haven't started shutdown
219
221
  @shutdown_queue.push signal unless @shutdown.true?
220
222
  rescue
221
223
  nil
@@ -3,5 +3,5 @@
3
3
  # rbs_inline: enabled
4
4
 
5
5
  class LocalBus
6
- VERSION = "0.1.1"
6
+ VERSION = "0.1.2"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: local_bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Hopkins (hopsoft)