Skip to main content

optiSLang 3D Postprocessing Script API 2025 R1

CancelBase Struct Reference

Last update: 16.07.2025

CancelBase provides an Interface to incorporate cancelling of computations in different ways. More...

Public Member Functions

virtual bool cancel ()=0
 Virtual destructor for safety reasons. More...
 
virtual bool isCancelled ()=0
 Returns the cancel state of the instance. The cancel state is false as long as no call to the cancel function took place. More...
 

Detailed Description

CancelBase provides an Interface to incorporate cancelling of computations in different ways.

Member Function Documentation

◆ cancel()

virtual bool cancel ( )
pure virtual

Virtual destructor for safety reasons.

A call to this function sets an instance into the cancelled state for which the function isCancelled will return true. The return value may be used in multi-threaded enveironments to determine the thread actually cancelling.

Returns
True iff this call actually was the cancel that execeuted;

Implemented in SimpleCancel.

◆ isCancelled()

virtual bool isCancelled ( )
pure virtual

Returns the cancel state of the instance. The cancel state is false as long as no call to the cancel function took place.

Returns
False iff cancel was never called.

Implemented in SimpleCancel.

Connect with Ansys