You just need to make sure cancellable syscalls do not happen in destructors. (Which you probably want to do anyways, since cancellable syscalls can cause errors that are difficult to handle in destructors.)
Good practice is to move destructed objects to a "garbage collection" thread which calls the real destructors and cannot be cancelled.
You just need to make sure cancellable syscalls do not happen in destructors. (Which you probably want to do anyways, since cancellable syscalls can cause errors that are difficult to handle in destructors.)
Good practice is to move destructed objects to a "garbage collection" thread which calls the real destructors and cannot be cancelled.