diff --git a/src/sync/event.ml b/src/sync/event.ml new file mode 100644 index 00000000..3ab78478 --- /dev/null +++ b/src/sync/event.ml @@ -0,0 +1,4 @@ +include Picos_std_event.Event + +let[@inline] of_fut (fut : _ Moonpool.Fut.t) : _ t = + from_computation (Moonpool.Fut.Private_.as_computation fut) diff --git a/src/sync/event.mli b/src/sync/event.mli new file mode 100644 index 00000000..6840433b --- /dev/null +++ b/src/sync/event.mli @@ -0,0 +1,5 @@ +include module type of struct + include Picos_std_event.Event +end + +val of_fut : 'a Moonpool.Fut.t -> 'a t diff --git a/src/sync/moonpool_sync.ml b/src/sync/moonpool_sync.ml index 2c5fe741..99065305 100644 --- a/src/sync/moonpool_sync.ml +++ b/src/sync/moonpool_sync.ml @@ -1,7 +1,7 @@ module Mutex = Picos_std_sync.Mutex module Condition = Picos_std_sync.Condition module Lock = Lock -module Event = Picos_std_event +module Event = Event module Semaphore = Picos_std_sync.Semaphore module Lazy = Picos_std_sync.Lazy module Latch = Picos_std_sync.Latch