returns TRUE if Mathematica is in the process of an abort.

Details and OptionsDetails
  • Used in C/C++ code in a library function called from Mathematica.
  • Code that runs for a long time should call AbortQ to see if the user has aborted the computation.
  • Calling AbortQ is the correct way to ensure that your function yields not only to aborts, but also to preemptive requests for evaluation, such as those which might be issued by controls and dynamic constructs in the notebook front end.
  • Any WSLINK objects which were passed into the function or created by getWSLINK will be discarded after the abort has been detected. It is not necessary to clean up these links as a part of handling an abort.
  • Examples

    Basic Examples  (1)

    This allows a long computation to be abortable from Mathematica:

    while( !longTaskComplete()) {
    if (libData->AbortQ()) {