mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-12 05:58:42 -05:00
feat: add Event.of_fut
This commit is contained in:
parent
8582f6f3bb
commit
ec5ac645de
3 changed files with 10 additions and 1 deletions
4
src/sync/event.ml
Normal file
4
src/sync/event.ml
Normal file
|
|
@ -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)
|
||||||
5
src/sync/event.mli
Normal file
5
src/sync/event.mli
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
include module type of struct
|
||||||
|
include Picos_std_event.Event
|
||||||
|
end
|
||||||
|
|
||||||
|
val of_fut : 'a Moonpool.Fut.t -> 'a t
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
module Mutex = Picos_std_sync.Mutex
|
module Mutex = Picos_std_sync.Mutex
|
||||||
module Condition = Picos_std_sync.Condition
|
module Condition = Picos_std_sync.Condition
|
||||||
module Lock = Lock
|
module Lock = Lock
|
||||||
module Event = Picos_std_event
|
module Event = Event
|
||||||
module Semaphore = Picos_std_sync.Semaphore
|
module Semaphore = Picos_std_sync.Semaphore
|
||||||
module Lazy = Picos_std_sync.Lazy
|
module Lazy = Picos_std_sync.Lazy
|
||||||
module Latch = Picos_std_sync.Latch
|
module Latch = Picos_std_sync.Latch
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue