class Opal::BuilderScheduler::Prefork
def fork_entrypoint(io)
def fork_entrypoint(io) # Ensure we can work with our forks async... Fiber.set_scheduler(nil) if Fiber.respond_to? :set_scheduler @in_fork = io until io.eof? $0 = 'opal/builder: idle' type, *args = *io.recv case type when :compile rel_path, req, autoloads, options = *args $0 = "opal/builder: #{req}" begin asset = builder.process_require_threadsafely(req, autoloads, options) io.send(:new_asset, asset) rescue Builder::MissingRequire => error io.send(:missing_require_exception, rel_path, error) end when :close io.goodbye break end end rescue Errno::EPIPE exit! end