![]() |
![]()
| ![]() |
![]()
NAMETcl_CancelEval, Tcl_Canceled - cancel Tcl scripts SYNOPSIS#include <tcl.h> int Tcl_CancelEval(interp, resultObjPtr, clientData, flags) int Tcl_Canceled(interp, flags) ARGUMENTS
DESCRIPTIONTcl_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. FLAG BITSAny OR'ed combination of the following values may be used for the flags argument to procedures such as Tcl_CancelEval:
REFERENCE COUNT MANAGEMENTTcl_CancelEval always decrements the reference count of its resultObjPtr argument (if that is non-NULL). It is expected to be usually called with an object with zero reference count. If the object is shared with some other location (including the Tcl evaluation stack) it should have its reference count incremented before calling this function. SEE ALSOinterp(n), Tcl_Eval(3), TIP 285 KEYWORDScancel, unwind
|