Skip to content

aimenux/CancellationDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CancellationDemo

Cancellation strategies demo

4 strategies are implemented in order to cancel a long running work

ManualCancellation : cancel long running cancellable work when pressing a cancel key

TimeoutCancellation : cancel long running cancellable work after a timeout delay

WrappedCancellation : wrap long running non cancellable work using a cancellation token

CompositeCancellation : cancel long running cancellable work using multiple cancellation tokens

Cancellation callbacks demo

3 examples of registered callbacks that raise exception before or after cancellation

CallbackRaiseExceptionAfterCancellation : raise exception in a callback registered after cancellation

CallbackRaiseExceptionBeforeCancellation : raise exception in a callback registered before cancellation

CallbacksRaiseExceptionsBeforeCancellation : raise exception in multiple callbacks registered before cancellation

About

Task cancellation strategies

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages