Skip to content

expose a way to identify currently-running engine - #1097

Merged
raphael-proust merged 3 commits into
masterfrom
expose-engine
Jan 23, 2026
Merged

raphael-proust merged 3 commits into
masterfrom
expose-engine

Conversation

@raphael-proust

Copy link
Copy Markdown
Collaborator

No description provided.

might be too flaky or require too much of a specific set-up to be
included in the final version, but it does work locally
Comment thread test/unix/set_engine.ml
Comment on lines +1 to +13
(* This file is part of Lwt, released under the MIT license. See LICENSE.md for
details, or visit https://github.com/ocsigen/lwt/blob/master/LICENSE.md. *)

open Lwt_engine

let () = set (new libev ())
let () = assert (match id () with Engine_id__libev eve -> Ev_backend.(equal eve default) | _ -> false)

let () = set (new libev ~backend:Ev_backend.poll ())
let () = assert (match id () with Engine_id__libev eve -> Ev_backend.(equal eve poll) | _ -> false)

let () = set (new select)
let () = assert (match id () with Engine_id__select -> true | _ -> false)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

as expected, this test doesn't work on many machines (crashes the CI runners)

works locally though, so probably ok to just remove the test and leave the feature

@raphael-proust
raphael-proust merged commit 9302bd0 into master Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants