interruptHandler property
FutureOr<void> Function(NotebookDocument)?
get
interruptHandler
Optional interrupt handler.
By default cell execution is canceled via {@link NotebookCellExecution.token tokens}. Cancellation
tokens require that a controller can keep track of its execution so that it can cancel a specific execution at a later
point. Not all scenarios allow for that, eg. REPL-style controllers often work by interrupting whatever is currently
running. For those cases the interrupt handler exists - it can be thought of as the equivalent of SIGINT
or Control+C
in terminals.
Note that supporting {@link NotebookCellExecution.token cancellation tokens} is preferred and that interrupt handlers should only be used when tokens cannot be supported.
Implementation
_i4.FutureOr<void> Function(_i3.NotebookDocument)? get interruptHandler =>
(_i3.NotebookDocument p0) => _i5.callMethod(
_i5.getProperty(
this,
'interruptHandler',
),
r'call',
[
this,
p0,
],
);
set
interruptHandler
(FutureOr<void> value(NotebookDocument)?)
Implementation
set interruptHandler(
_i4.FutureOr<void> Function(_i3.NotebookDocument)? value) {
_i5.setProperty(
this,
'interruptHandler',
value == null
? _i6.undefined
: _i5.allowInterop((p0) => _i6.Promise.futureOr(() => value(p0))),
);
}