Metodo System::Threading::CancellationToken::Register

CancellationToken::Register method

Registra una callback che verrà invocata quando viene richiesta la cancellazione.

CancellationTokenRegistration System::Threading::CancellationToken::Register(const Action<> &callback) const
ParametroTipoDescrizione
callbackconst Action<>&L’Action<> da eseguire quando viene richiesto l’annullamento.

ReturnValue

Un oggetto CancellationTokenRegistration che può essere usato per deregistrare la callback.

Osservazioni

Se l’annullamento è già stato richiesto, la callback verrà invocata immediatamente.

Vedi anche