Cancellation.ExpertSourceglobalize t is t @ global.
Cancellation tokens are generally strictly scoped as they are implicitly canceled at the end of their scope. Within a token's scope, however, one may e.g. need to link to it from a newly spawned thread or domain and in that case one the token needs to be globalized.
create () creates a fresh unscoped cancellation token.
Cancellation tokens are generally strictly scoped. When using an unscoped token one should arrange for the token to be canceled after it is no longer needed to ensure that any attached resources will be cleaned up.
is_canceled_ignore_termination t is true if t has been canceled and false otherwise. Unlike is_canceled, this version does not take a terminator, so should only be used where termination is already being handled separately.
check_clean_and_close t checks that t has no unsignalled triggers attached to it and then cancels t.
If you are manually managing a cancellation token, then it is good practice to ensure that no triggers remain attached to the token after the token is no longer in use. Doing so can reveal resource leaks and issues with scoping.