MapleGetInterruptValue
return a Boolean value indicating whether an interrupt request has been received
Calling Sequence
Parameters
Description
Examples
MapleGetInterruptValue(kv)
kv
-
kernel handle of type MKernelVector
This function returns a value of TRUE if an interrupt request has been received, and FALSE otherwise.
The MapleGetInterruptValue function allows code to perform any clean up necessary before calling MapleCheckInterrupt.
#include "maplec.h"
ALGEB M_DECL DoABunchOfWork( MKernelVector kv, ALGEB *args )
{
int i;
int *data = (int*)malloc( 1000 );
for ( i = 0; i < 100000; i++ )
/* has an interrupt occurred? */
if ( MapleGetInterruptValue( kv ) )
/* if so, clean up data then handle the interrupt */
free( data );
MapleCheckInterrupt( kv );
}
DoABitOfWork( kv, args, data );
return ToMapleNULL( kv );
See Also
CustomWrapper
define_external
eval
OpenMaple
OpenMaple/C/API
OpenMaple/C/Examples
Download Help Document