Documentation generated from fossil trunk
Tcl_CancelEval, Tcl_Canceled -
cancel Tcl scripts
#include <tcl.h> int Tcl_CancelEval(interp, clientData, flags) int Tcl_Canceled(interp, flags)
Type | Name | Mode |
---|---|---|
Tcl_Interp | *interp | in |
Interpreter in which to cancel the script. | ||
int | flags | in |
ORed combination of flag bits that specify additional options. For Tcl_CancelEval, only TCL_CANCEL_UNWIND is currently supported. For Tcl_Canceled, only TCL_LEAVE_ERR_MSG and TCL_CANCEL_UNWIND are currently supported. | ||
ClientData | clientData | in |
Currently, reserved for future use. It should be set to NULL. |
Tcl_CancelEval cancels or unwinds the script in progress soon after the next invocation of asynchronous handlers, causing TCL_ERROR to be the return code for that script. This function is thread-safe and may be called from any thread in the process.
Tcl_Canceled checks if the script in progress has been canceled and returns TCL_ERROR if it has. Otherwise, TCL_OK is returned. Extensions can use this function to check to see if they should abort a long running command. This function is thread sensitive and may only be called from the thread the interpreter was created in.
Any ORed combination of the following values may be used for the flags argument to procedures such as Tcl_CancelEval:
TIP 285