Commit 67d68aa
committed
Wire fork safety into native transport via
Register a `:child` callback that calls `_native_after_fork_in_child`
on the exporter to recreate the tokio runtime in forked child
processes. Without this, the Rust runtime is dead after fork and
subsequent send calls would hang or fail.
The `AtForkMonkeyPatch` only supports `:child` stage, so
`before_fork` and `after_fork_in_parent` are not called. The child
path is the critical one: it creates a fresh runtime regardless of
whether the parent was prepared.AtForkMonkeyPatch
1 parent f170f9e commit 67d68aa
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
| |||
0 commit comments