This commit is contained in:
Simon Cruanes 2024-02-03 00:50:08 -05:00
parent e9c09406ba
commit c8e99fd7ee
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 0 additions and 10 deletions

View file

@ -144,8 +144,6 @@ let add_child_ ~protect (self : _ t) (child : _ t) =
() ()
done done
exception Cancelled of Exn_bt.t
(** Key to access the current fiber. *) (** Key to access the current fiber. *)
let k_current_fiber : any option Task_local_storage.key = let k_current_fiber : any option Task_local_storage.key =
Task_local_storage.new_key ~init:(fun () -> None) () Task_local_storage.new_key ~init:(fun () -> None) ()

View file

@ -9,10 +9,6 @@
of structured concurrency of structured concurrency
*) *)
(**/**)
(**/**)
type 'a t type 'a t
(** A fiber returning a value of type ['a]. *) (** A fiber returning a value of type ['a]. *)
@ -48,10 +44,6 @@ val yield : unit -> unit
(** Yield control to the scheduler from the current fiber. (** Yield control to the scheduler from the current fiber.
@raise Failure if not run from inside a fiber. *) @raise Failure if not run from inside a fiber. *)
exception Cancelled of Exn_bt.t
(** Exception for fibers that are cancelled. Polling points such
as {!yield} and {!await} will raise this if the fiber has been cancelled. *)
val with_cancel_callback : _ t -> cancel_callback -> (unit -> 'a) -> 'a val with_cancel_callback : _ t -> cancel_callback -> (unit -> 'a) -> 'a
(** [with_cancel_callback fib cb (fun () -> <e>)] evaluates [e] (** [with_cancel_callback fib cb (fun () -> <e>)] evaluates [e]
in a scope in which, if the fiber [fib] is cancelled, in a scope in which, if the fiber [fib] is cancelled,