async-container 0.35.0 → 0.35.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
  SHA256:
3
- metadata.gz: 047d770adce55a53f648a828ac9e1b4694598d8815d06c271cb293b31829ac90
4
- data.tar.gz: d54a1bda7d25bd2d33b72c62ea0722a8c82a3a68045b1cae529ed149d37e5ea8
3
+ metadata.gz: 293edf1aac3945b8751879fe8b8180e7fb9bcc769f5b1bea315687f19d33ea11
4
+ data.tar.gz: 60699b17d30ce273a236b0728246a10fb7bb47691d3f2b3827a0bc08c51fa097
5
5
  SHA512:
6
- metadata.gz: 5175d784347c33381f3014ce30845448890b6074ddb606861877fb23937a1afcdf0d776dd70d5f700498de4b09e59560936b78f59d0b3b2f2bf9b96d132efa24
7
- data.tar.gz: c5e130f7dd4723935e9ae95f3aebb63dcea17aba57c2a995a5bb5ac4085973e63b5c1bf3dfb79d9ea79dd20b3a017be9b7f38937babe4f09ac7c6135f44f7300
6
+ metadata.gz: 2febcb62a2cdce3e43e92fa0d39a943bb92ade5ef0af9401810853fdb27bca98805a75d029926bbf61de0a130da293169fc9533d091d74cd11c0d01f0ee5c296
7
+ data.tar.gz: 909529d757ada40f2501f96455df4f4ecad4a739365b52ef35ef77ae449c9b6869351a73cb28e0c335ef0793fed2c35656a9e6218e1b79da73fec5d4a8b09e9c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -117,6 +117,10 @@ module Async
117
117
 
118
118
  # Gracefully interrupt all child instances.
119
119
  def interrupt
120
+ # We must enter the stopping state before signalling the children. Interrupting a child causes it to drain and exit, but the main run loop will respawn any child that exits while `restart: true` and the container is not stopping (see the `restart && !@stopping` gate in `#run`). Without setting this flag, an interrupted child immediately respawns, so the container never drains and `#wait` never returns.
121
+ #
122
+ # This matters most for `Hybrid` containers: a `SIGINT`/`SIGTERM` delivered to a fork is translated into a call to `#interrupt` on the inner threaded container, which typically runs with `restart: true` (the default for `async-service` managed services). If `#interrupt` did not set this flag, the inner threads would drain, exit, and respawn in a loop, so a single signal would never terminate the fork. Setting `@stopping = true` here makes `#interrupt` behave as the start of a graceful shutdown: children drain and exit, are not respawned, and the fork terminates - consistent with how `Forked` and `Threaded` containers handle a single interrupt.
123
+ @stopping = true
120
124
  @group.interrupt
121
125
  end
122
126
 
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Container
8
- VERSION = "0.35.0"
8
+ VERSION = "0.35.1"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -28,6 +28,10 @@ Please see the [project documentation](https://socketry.github.io/async-containe
28
28
 
29
29
  Please see the [project releases](https://socketry.github.io/async-container/releases/index) for all releases.
30
30
 
31
+ ### v0.35.1
32
+
33
+ - **Fixed**: `Hybrid` container now stops on interrupt instead of restarting indefinitely.
34
+
31
35
  ### v0.35.0
32
36
 
33
37
  - **Fixed**: `Hybrid` now interrupts inner threaded children during graceful shutdown and force-stops remaining children on exit.
@@ -65,12 +69,6 @@ Please see the [project releases](https://socketry.github.io/async-container/rel
65
69
  - Minor **breaking** changes to `Async::Container::Policy` interface.
66
70
  - Expose `Async::Container::Statistics::Rate#window`.
67
71
 
68
- ### v0.31.0
69
-
70
- - Introduce `Async::Container::Policy` for managing child lifecycle events and implementing custom failure handling strategies.
71
- - Add `Async::Container::Statistics::Rate` for tracking failure and restart rates over sliding time windows.
72
- - Fix restart counter to only increment when actually restarting (check `@running` flag).
73
-
74
72
  ## Contributing
75
73
 
76
74
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.35.1
4
+
5
+ - **Fixed**: `Hybrid` container now stops on interrupt instead of restarting indefinitely.
6
+
3
7
  ## v0.35.0
4
8
 
5
9
  - **Fixed**: `Hybrid` now interrupts inner threaded children during graceful shutdown and force-stops remaining children on exit.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.0
4
+ version: 0.35.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file