Module Control
Global control of Coq.
val interrupt : bool Stdlib.refCoq interruption: set the following boolean reference to interrupt Coq (it eventually raises
Break, simulating a Ctrl-C)
val check_for_interrupt : unit -> unitUse this function as a potential yield function. If
interrupthas been set, il will raiseSys.Break.
val timeout : float -> ('a -> 'b) -> 'a -> 'b optiontimeout n f xtries to computeSome (f x), and if it fails to do so beforenseconds, returnsNoneinstead.
type timeout={timeout : a b. float -> ('a -> 'b) -> 'a -> 'b option;}Set a particular timeout function; warning, this is an internal API and it is scheduled to go away.
val set_timeout : timeout -> unitval protect_sigalrm : ('a -> 'b) -> 'a -> 'bprotect_sigalrm f xcomputesf x, but if SIGALRM is received during that computation, the signal handler is executed only once the computation is terminated. Otherwise said, it makes the execution offatomic w.r.t. handling of SIGALRM.This is useful for example to prevent the implementation of `Timeout` to interrupt I/O routines, generating ill-formed output.