Module Quill.Kernel
Code execution kernels.
A kernel executes code and produces outputs. The interface is abstract to support different backends: in-process toplevels, subprocess-based kernels, remote kernels, etc.
Kernel status
Kernel events
type event = | Output of {cell_id : Cell.id;output : Cell.output;
}| Finished of {cell_id : Cell.id;success : bool;
}| Status_changed of status(*The type for kernel events.
Outputis emitted for each piece of output during execution.Finishedsignals that execution of a cell has completed.Status_changedsignals a kernel lifecycle change.
Kernel interface
type t = {execute : cell_id:Cell.id -> code:string -> unit;interrupt : unit -> unit;complete : code:string -> pos:int -> string list;status : unit -> status;shutdown : unit -> unit;
}The type for kernel handles.
execute ~cell_id ~codesubmits code for execution. Results are delivered aseventvalues through the callback registered at kernel creation time.interrupt ()requests interruption of the current execution.complete ~code ~posreturns completion candidates at the given cursor position incode.status ()returns the current kernel status.shutdown ()initiates graceful shutdown.