Dummy NOOP interrupter class defining interface.
More...
#include <NullInterrupter.h>
Dummy NOOP interrupter class defining interface.
This shows the required interface for the InterrupterType
template argument using by several threaded applications (e.g. tools/PointAdvect.h). The host application calls start() at the beginning of an interruptible operation, end() at the end of the operation, and wasInterrupted() periodically during the operation. If any call to wasInterrupted() returns true
, the operation will be aborted.
- Note
- This Dummy interrupter will NEVER interrupt since wasInterrupted() always returns false!
Signal the end of an interruptible operation.
void start |
( |
const char * |
name = nullptr | ) |
|
|
inline |
Signal the start of an interruptible operation.
- Parameters
-
name | an optional descriptive name for the operation |
bool wasInterrupted |
( |
int |
percent = -1 | ) |
|
|
inline |
Check if an interruptible operation should be aborted.
- Parameters
-
percent | an optional (when >= 0) percentage indicating the fraction of the operation that has been completed |
- Note
- this method is assumed to be thread-safe. The current implementation is clearly a NOOP and should compile out during optimization!
The documentation for this struct was generated from the following file: