class Async::Scheduler

def process_fork

@public Since *Async v2.35*.

The child process starts with a clean slate - no scheduler is set. Users can create a new scheduler if needed.

Handle fork in the child process. This method is called automatically when `Process.fork` is invoked on Ruby versions < 4 and cleans up the scheduler state. On Ruby 4+, the scheduler is automatically cleaned up by the Ruby runtime.
def process_fork
	@profiler = nil
	@children = nil
	@selector = nil
	@timers = nil
	@blocked = 0
	
	# Close the scheduler:
	Fiber.set_scheduler(nil)
end