dturecek / copr / copr

Forked from copr/copr 6 years ago
Clone

0eb6e0a backend: ignore exceptions in CancellableThreadTask

Authored and Committed by praiskup 3 years ago
    backend: ignore exceptions in CancellableThreadTask
    
    Any exception in the "method" or "cancel" callbacks could cause a
    de-sync of the threads, so we just log the exception and ignore it.
    Callers are responsible for writing exception-free callbacks.
    
    Anyways, this is pretty safe change because - if the cancel request
    isn't delivered because of ignored exception - we'll simply wait till
    the "method" callback ends (nothing worse can happen).
    
    Also drop the DeadWorker exception which wasn't caught anywhere before.