[ruby-core:123928] [Ruby Feature#21717] Introduce Fiber::Scheduler#process_fork hook
Issue #21717 has been reported by noteflakes (Sharon Rosner). ---------------------------------------- Feature #21717: Introduce Fiber::Scheduler#process_fork hook https://bugs.ruby-lang.org/issues/21717 * Author: noteflakes (Sharon Rosner) * Status: Open ---------------------------------------- When using a fiber scheduler and forking a process, the child process "inherits" the fiber scheduler. For the fiber scheduler to be usable in the forked process, its internal state should in most cases be reset. I propose the introduction of a `Fiber::Scheduler#process_fork` hook, called by the Ruby runtime immediately after a fork. The associated PR: https://github.com/ruby/ruby/pull/15342 -- https://bugs.ruby-lang.org/
Issue #21717 has been updated by Dan0042 (Daniel DeLorme). Ruby already has an API for this: `Process._fork` If your Fiber scheduler needs to be reset after a fork, I would recommend hooking into this. ---------------------------------------- Feature #21717: Introduce Fiber::Scheduler#process_fork hook https://bugs.ruby-lang.org/issues/21717#change-115360 * Author: noteflakes (Sharon Rosner) * Status: Open ---------------------------------------- When using a fiber scheduler and forking a process, the child process "inherits" the fiber scheduler. For the fiber scheduler to be usable in the forked process, its internal state should in most cases be reset. I propose the introduction of a `Fiber::Scheduler#process_fork` hook, called by the Ruby runtime immediately after a fork. The associated PR: https://github.com/ruby/ruby/pull/15342 -- https://bugs.ruby-lang.org/
participants (2)
-
Dan0042 (Daniel DeLorme) -
noteflakes (Sharon Rosner)