no need to configure for us

This commit is contained in:
Simon Cruanes 2024-09-05 13:49:17 -04:00
parent 784127316d
commit d7c8df43d9
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -4,19 +4,8 @@ module Select = Picos_io_select
let fd_of_unix_fd : Unix.file_descr -> Fd.t = Fun.id let fd_of_unix_fd : Unix.file_descr -> Fd.t = Fun.id
open struct
let has_configured = Atomic.make false
end
let configure ?intr_sig ?handle_sigchld ?ignore_sigpipe () : unit =
if not (Atomic.exchange has_configured true) then
Select.configure ?intr_sig ?handle_sigchld ?ignore_sigpipe ()
(** [main f] runs [f()] inside a scheduler. *) (** [main f] runs [f()] inside a scheduler. *)
let main ?intr_sig ?handle_sigchld ?ignore_sigpipe (f : Moonpool.Runner.t -> 'a) let main (f : Moonpool.Runner.t -> 'a) : 'a = Moonpool_fib.main f
: 'a =
configure ?intr_sig ?handle_sigchld ?ignore_sigpipe ();
Moonpool_fib.main f
(** {2 Async read/write} *) (** {2 Async read/write} *)