Skip to content

Commit

Permalink
no need to configure for us
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Sep 5, 2024
1 parent 7841273 commit d7c8df4
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/io/moonpool_io.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,8 @@ module Select = Picos_io_select

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. *)
let main ?intr_sig ?handle_sigchld ?ignore_sigpipe (f : Moonpool.Runner.t -> 'a)
: 'a =
configure ?intr_sig ?handle_sigchld ?ignore_sigpipe ();
Moonpool_fib.main f
let main (f : Moonpool.Runner.t -> 'a) : 'a = Moonpool_fib.main f

(** {2 Async read/write} *)

Expand Down

0 comments on commit d7c8df4

Please sign in to comment.