Skip to content

Commit

Permalink
Stub out processes on luv backend
Browse files Browse the repository at this point in the history
  • Loading branch information
patricoferris committed Apr 1, 2023
1 parent 419c5fb commit f402423
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lib_eio_luv/eio_luv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,7 @@ type stdenv = <
stdout : sink;
stderr : sink;
net : Eio.Net.t;
process_mgr : Eio.Process.mgr;
domain_mgr : Eio.Domain_manager.t;
clock : Eio.Time.clock;
mono_clock : Eio.Time.Mono.t;
Expand Down Expand Up @@ -1160,6 +1161,7 @@ let stdenv ~run_event_loop =
method stdout = Lazy.force stdout
method stderr = Lazy.force stderr
method net = net
method process_mgr = failwith "Processes are not supported using libuv"
method domain_mgr = domain_mgr ~run_event_loop
method clock = clock
method mono_clock = mono_clock
Expand Down
1 change: 1 addition & 0 deletions lib_eio_luv/eio_luv.mli
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ type stdenv = <
stdout : sink;
stderr : sink;
net : Eio.Net.t;
process_mgr : Eio.Process.mgr;
domain_mgr : Eio.Domain_manager.t;
clock : Eio.Time.clock;
mono_clock : Eio.Time.Mono.t;
Expand Down
6 changes: 3 additions & 3 deletions lib_main/dune
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(select posix_backend.ml from
(eio_posix -> posix_backend.enabled.ml)
( -> posix_backend.disabled.ml))
; (select luv_backend.ml from
; (eio_luv -> luv_backend.enabled.ml)
; ( -> luv_backend.disabled.ml))
(select luv_backend.ml from
(eio_luv -> luv_backend.enabled.ml)
( -> luv_backend.disabled.ml))
))
6 changes: 3 additions & 3 deletions lib_main/eio_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ let force run fn =
let run fn =
match Sys.getenv_opt "EIO_BACKEND" with
| Some ("io-uring" | "linux") -> force Linux_backend.run fn
| None | Some "posix" -> force Posix_backend.run fn
(* | Some "luv" -> force Luv_backend.run fn
| Some "posix" -> force Posix_backend.run fn
| Some "luv" -> force Luv_backend.run fn
| None | Some "" ->
Linux_backend.run fn ~fallback:(fun _ ->
Posix_backend.run fn ~fallback:(fun _ ->
force Luv_backend.run fn
)
) *)
)
| Some x -> Fmt.failwith "Unknown Eio backend %S (from $EIO_BACKEND)" x

0 comments on commit f402423

Please sign in to comment.