Table of Contents

ICancellationTokenSource Interface

Requests cancellation of the token it hands out.

Remarks

Create one with TCancellationTokenSource. Give Token to the code doing the work, and keep the source to yourself.

Syntax

Unit: Bcl.Cancellation

ICancellationTokenSource = interface(IInterface);

Methods

Name Description
Cancel Requests cancellation. Safe from any thread, and more than once: only the first call has an effect.
CancelAfter Requests cancellation once ATimeoutMs milliseconds have passed.
IsCancellation​Requested Whether cancellation has been requested.
Token The token controlled by this source.