async-container 0.35.1 → 0.36.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/container/forked.rb +17 -15
- data/lib/async/container/version.rb +1 -1
- data/readme.md +4 -5
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0b7c79f742eb9268bd10341606d71dcb98855a5112ba7022d35a38618185c3ea
|
|
4
|
+
data.tar.gz: 37a766f7e70db3d39ae22af3a4c1e0edfc92470f7d34bc0030791d3f23d8feea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d538e1db3f7483707fb77b7012b293eb51e89ae7c25be6f8af738e0e5ae0f43528c2e437a322f1180fe12425560280341428e5b4264eeacda2396766b687c46
|
|
7
|
+
data.tar.gz: 2f405c30b3037e15c132e390bb3df865a2bfbe191d665511d9321c4ef0777245ef6146f914134addfece8fc0b279f194621bfd70c1952738b0c6e5bb461ecac8
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -101,23 +101,25 @@ module Async
|
|
|
101
101
|
def self.fork(**options)
|
|
102
102
|
# $stderr.puts fork: caller
|
|
103
103
|
self.new(**options) do |process|
|
|
104
|
-
::
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
# This could be a configuration option:
|
|
111
|
-
::Thread.handle_interrupt(SignalException => :immediate) do
|
|
112
|
-
yield Instance.for(process)
|
|
113
|
-
rescue Interrupt
|
|
114
|
-
# Graceful exit.
|
|
115
|
-
rescue Exception => error
|
|
116
|
-
Console.error(self, error)
|
|
104
|
+
::Thread.new do
|
|
105
|
+
::Process.fork do
|
|
106
|
+
# We use `Thread.current.raise(...)` so that exceptions are filtered through `Thread.handle_interrupt` correctly.
|
|
107
|
+
Signal.trap(:INT){::Thread.current.raise(Interrupt)}
|
|
108
|
+
Signal.trap(:TERM){::Thread.current.raise(Interrupt)} # Same as SIGINT.
|
|
109
|
+
Signal.trap(:HUP){::Thread.current.raise(Restart)}
|
|
117
110
|
|
|
118
|
-
|
|
111
|
+
# This could be a configuration option:
|
|
112
|
+
::Thread.handle_interrupt(SignalException => :immediate) do
|
|
113
|
+
yield Instance.for(process)
|
|
114
|
+
rescue Interrupt
|
|
115
|
+
# Graceful exit.
|
|
116
|
+
rescue Exception => error
|
|
117
|
+
Console.error(self, error)
|
|
118
|
+
|
|
119
|
+
exit!(1)
|
|
120
|
+
end
|
|
119
121
|
end
|
|
120
|
-
end
|
|
122
|
+
end.value
|
|
121
123
|
end
|
|
122
124
|
end
|
|
123
125
|
|
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.36.0
|
|
32
|
+
|
|
33
|
+
- Forked containers now fork child processes from a short-lived thread, reducing inherited scheduler and parent stack state in children.
|
|
34
|
+
|
|
31
35
|
### v0.35.1
|
|
32
36
|
|
|
33
37
|
- **Fixed**: `Hybrid` container now stops on interrupt instead of restarting indefinitely.
|
|
@@ -64,11 +68,6 @@ Please see the [project releases](https://socketry.github.io/async-container/rel
|
|
|
64
68
|
|
|
65
69
|
- Expose `Async::Container::Controller` `#notify`, `#container_class`, and `#graceful_stop` for testing.
|
|
66
70
|
|
|
67
|
-
### v0.32.0
|
|
68
|
-
|
|
69
|
-
- Minor **breaking** changes to `Async::Container::Policy` interface.
|
|
70
|
-
- Expose `Async::Container::Statistics::Rate#window`.
|
|
71
|
-
|
|
72
71
|
## Contributing
|
|
73
72
|
|
|
74
73
|
We welcome contributions to this project.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.36.0
|
|
4
|
+
|
|
5
|
+
- Forked containers now fork child processes from a short-lived thread, reducing inherited scheduler and parent stack state in children.
|
|
6
|
+
|
|
3
7
|
## v0.35.1
|
|
4
8
|
|
|
5
9
|
- **Fixed**: `Hybrid` container now stops on interrupt instead of restarting indefinitely.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|