async-container 0.37.0 → 0.38.0

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: 62299eb75e389a8fcf1f7b179cdbc7803a0ecebc4fe41fb6e1f1023b702b5573
4
- data.tar.gz: d13e79527be255c01311c07979eaed4ca6c22d18c36b51a2ea2644617975562c
3
+ metadata.gz: 2afc84589d803bb2b4205a0da9397039659626c90e88b6b530cba4e1f1e51414
4
+ data.tar.gz: 8f1d086baf92d980511ed2f7ce1e165a32bd92aec8302673ee67489200e87519
5
5
  SHA512:
6
- metadata.gz: d819e162498afd6c99125e525145fe981ceccb6d6bed77da0d01ea586f91052a24666bcd37676d66662d52637db0827536d61669e4ffee816de57d32ba621a56
7
- data.tar.gz: a01f2d1a4e22ac3152392bbbdc42475ab333d1cc4605d3fb20711f495e889a2fd91de77d1bdfed580267d5d49d932b74f1b491a584551bd79b55a4cf285b474e
6
+ metadata.gz: 8c3bf95bc47ca93403e14f6c517f77f1b7c48f033d63e451fd6ee7f731b793d6220cff578cda76446055badb75281ea9517f3da26c4abae4cb49e6a87a275e5b
7
+ data.tar.gz: ca937e711802c41d6f397d02e267308b5123385369e739b52fd6cda74aca3f3a4af1f9d0d12643759ee325db76e8247f6fd1b35741b4b592200086dfc5f22c90
checksums.yaml.gz.sig CHANGED
Binary file
@@ -101,7 +101,8 @@ module Async
101
101
  def self.fork(**options)
102
102
  # $stderr.puts fork: caller
103
103
  self.new(**options) do |process|
104
- ::Thread.new do
104
+ # CRuby makes the currently executing fiber the root fiber in the child process and clears its resuming fiber, so the caller's stack can be collected without forking from a separate native thread:
105
+ ::Fiber.new(blocking: true) do
105
106
  ::Process.fork do
106
107
  # We use `Thread.current.raise(...)` so that exceptions are filtered through `Thread.handle_interrupt` correctly.
107
108
  Signal.trap(:INT){::Thread.current.raise(Interrupt)}
@@ -119,7 +120,7 @@ module Async
119
120
  exit!(1)
120
121
  end
121
122
  end
122
- end.value
123
+ end.resume
123
124
  end
124
125
  end
125
126
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2025, by Samuel Williams.
4
+ # Copyright, 2019-2026, by Samuel Williams.
5
5
  # Copyright, 2022, by Anton Sozontov.
6
6
 
7
7
  require_relative "forked"
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Container
8
- VERSION = "0.37.0"
8
+ VERSION = "0.38.0"
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.38.0
32
+
33
+ - Fork child processes from a clean fiber stack rather than a short-lived native thread, preserving child garbage collection while improving compatibility with native libraries.
34
+
31
35
  ### v0.37.0
32
36
 
33
37
  - Rename `ASYNC_CONTAINER_GRACEFUL_TIMEOUT` to `ASYNC_CONTAINER_GRACEFUL_STOP` and apply it at the controller level as `GRACEFUL_STOP`. `Group#stop` now only applies the shutdown policy it is given.
@@ -64,10 +68,6 @@ Please see the [project releases](https://socketry.github.io/async-container/rel
64
68
 
65
69
  - Add `Async::Container::Generic#stopping?` so that policies can more accurately track the state of the container.
66
70
 
67
- ### v0.33.0
68
-
69
- - Add `Policy#make_statistics` to allow policies to customize statistics initialization.
70
-
71
71
  ## Contributing
72
72
 
73
73
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.38.0
4
+
5
+ - Fork child processes from a clean fiber stack rather than a short-lived native thread, preserving child garbage collection while improving compatibility with native libraries.
6
+
3
7
  ## v0.37.0
4
8
 
5
9
  - Rename `ASYNC_CONTAINER_GRACEFUL_TIMEOUT` to `ASYNC_CONTAINER_GRACEFUL_STOP` and apply it at the controller level as `GRACEFUL_STOP`. `Group#stop` now only applies the shutdown policy it is given.
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.37.0
4
+ version: 0.38.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -49,14 +49,14 @@ dependencies:
49
49
  requirements:
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: '2.22'
52
+ version: '2.44'
53
53
  type: :runtime
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '2.22'
59
+ version: '2.44'
60
60
  executables: []
61
61
  extensions: []
62
62
  extra_rdoc_files: []
metadata.gz.sig CHANGED
Binary file