mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 11:15:38 -05:00
feat fib: add Private.cancel_from_outside
This commit is contained in:
parent
11b4042707
commit
b47da2396e
2 changed files with 5 additions and 0 deletions
|
|
@ -40,6 +40,10 @@ module Private_ = struct
|
|||
match A.get self.state with
|
||||
| Alive _ -> false
|
||||
| Terminating_or_done _ -> true
|
||||
|
||||
let cancel_from_outside (self : _ t) ebt : unit =
|
||||
Fut.fulfill_idempotent (Fut.Private_.unsafe_promise_of_fut self.res)
|
||||
@@ Error ebt
|
||||
end
|
||||
|
||||
include Private_
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ module Private_ : sig
|
|||
type any = Any : _ t -> any [@@unboxed]
|
||||
|
||||
val get_cur : unit -> any option
|
||||
val cancel_from_outside : _ t -> Exn_bt.t -> unit
|
||||
end
|
||||
|
||||
(**/**)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue