NO FRAMES

CPXsetterminate

public int CPXsetterminate(CPXENVptr env, volatile int * terminate_p)
Definition file: cplex.h

This routine enables applications to terminate CPLEX gracefully.

Conventionally, your application should first call this routine to set a pointer to the termination signal. Then the application can set the termination signal to a nonzero value to tell CPLEX to abort. These conventions will terminate CPLEX even in a different thread. In other words, this routine makes it possible to handle signals such as control-C from a user interface. These conventions also enable termination within CPLEX callbacks.

Example

   status = CPXsetterminate (env, &terminate);
   

Parameters:

env

The pointer to the ILOG CPLEX environment, as returned by CPXopenCPLEX.

terminate_p

A pointer to the termination signal.

Returns:

The routine returns zero if successful and nonzero if an error occurs.