Module Fut_backend_base
Fut backend base module.
Implements the exception trap and defines backend tools and signatures.
Exception trap
type exn_ctx=[|`Queue of string|`Future|`Finalizer|`Backend|`Fd_action|`Timer_action|`Signal_action|`Runtime_action|`Exn_trap]The type for exception contexts.
type exn_info= exn_ctx * exn * Stdlib.Printexc.raw_backtraceThe type for info about trapped exceptions. The context, the exception, and the backtrace.
val set_exn_trap : (exn_info -> unit) -> unitset_exn_trap his a function called whenever the runtime system catches an exception.
val pp_exn_info : Stdlib.Format.formatter -> exn_info -> unitpp_exn_info ppf iprints an unspecified representation ofionppf.
val exn_trap : exn_ctx -> exn -> Stdlib.Printexc.raw_backtrace -> unitexn_traps ctx exn bttraps the exceptionexnin contextctxwith backtracebt.
val trap : exn_ctx -> ('a -> unit) -> 'a -> unittrap ctx f xexecutesf xand if it raises traps the exception with contextctx.
Backend tools
val err_invalid_worker_count : int -> stringerr_invalid_worker_count nis a string to raiseInvalid_argumentwheneverset_worker_countis called withn < 0.
Queues
Backend interface
type abort= unit -> unitSee
Fut.Runtime.abort.
module type Backend = sig ... endFut backend interface.