Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to mark workers as fork unsafe #55

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

casperisfine
Copy link
Contributor

When some part of an application is hard or impossible to make fork-safe, but rarely called, it's possible to simply mark the worker as fork unsafe, and rely on its siblings to fork the next generation.

In the eventually where all the workers end up marked fork unsafe, no new generation will be spawned, unless of course one of the unsafe workers die and is replaced by a fresh one.

So this is only meant as a workaround for infrequently called things.

When some part of an application is hard or impossible to make
fork-safe, but rarely called, it's possible to simply mark the worker
as fork unsafe, and rely on its siblings to fork the next generation.

In the eventually where all the workers end up marked fork unsafe,
no new generation will be spawned, unless of course one of the unsafe
workers die and is replaced by a fresh one.

So this is only meant as a workaround for infrequently called things.
@casperisfine casperisfine merged commit 36683c4 into master Jul 24, 2023
11 checks passed
@casperisfine casperisfine deleted the dynamic-reforking-disable branch July 24, 2023 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants