ThreadCancellation.cancel

void cancel(ulong tid, bool immediate = true, ulong flag = 0) @safe

Request cancellation of a libdar operation in the specified thread.

Parameters

tidthe thread ID (use currentThreadId to get the current thread's ID)
immediateif true, cancel as fast as possible; if false, try to make archive usable
flaguser-defined value passed to the cancellation exception (default: 0)

Throws

DarException if cancellation is not available or fails.