Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion prelude.ml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,12 @@ let call_me_maybe f x =
| None -> ()
| Some f -> f x

(*
If libev backend is available, do nothing (lwt uses it as default).
Otherwise, prefer poll over select, because select can only monitor fds up to 1024,
and poll is guaranteed to be available without the fd limitation.
*)
let () =
Lwt_engine.set @@ new Lwt_engines.poll
if not (Lwt_config._HAVE_LIBEV && Lwt_config.libev_default) then begin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Lwt_engine.set @@ new Lwt_engines.poll
end