# thread_cancellation.hpp File Reference

to be able to cancel libdar operation while running in a given thread. More...

`#include "../my_config.h"`
`#include <list>`
`#include "integers.hpp"`

Go to the source code of this file.

## Classes
class | libdar::thread_cancellation
| class to be used as parent to provide checkpoints to inherited classes More...
## Namespaces
namespace | libdar
| libdar namespace encapsulate all libdar symbols

## Detailed Description

to be able to cancel libdar operation while running in a given thread.

the class thread_cancellation implemented in this module permits to define checkpoints where is looked whether the current thread has been marked as to be canceled by the user The advantage of this class is that it then throws a Euser_abort exception which properly terminates the libdar operation in the thread freeing allocated memory and release mutex properly. Note that the thread is not canceled but libdar call in this thread returns as soon as a checkpoint is met during the execution.

Definition in file thread_cancellation.hpp.