try to work for lwt 5 and lwt 6

This commit is contained in:
Simon Cruanes 2026-03-13 13:37:37 -04:00
parent 8438a46be5
commit cbc1809237
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
4 changed files with 17 additions and 1 deletions

View file

@ -25,3 +25,15 @@
mtime.clock.os
lwt.unix)
(synopsis "Lwt-specific helpers for opentelemetry-client"))
(rule
(enabled_if
(>= %{version:lwt} 6.0))
(action
(copy types_.ml.6 types_.ml)))
(rule
(enabled_if
(< %{version:lwt} 6.0))
(action
(copy types_.ml.5 types_.ml)))

View file

@ -5,7 +5,7 @@ module IO = Io_lwt
type t = {
notified: bool Atomic.t;
cond: unit Lwt_condition.t;
notification: Lwt_unix.notification;
notification: Types_.notification;
lwt_tid: int; (** thread ID where lwt runs *)
deleted: bool Atomic.t;
}

View file

@ -0,0 +1,2 @@
type notification = int

View file

@ -0,0 +1,2 @@
type notification = Lwt_unix.notification