A cancellation token is passed to an asynchronous or long running operation to request cancellation, like cancelling a request for completion items because the user continued to type.
To get an instance of a CancellationToken
use a
{@link CancellationTokenSource }.
A cancellation token is passed to an asynchronous or long running operation to request cancellation, like cancelling a request for completion items because the user continued to type. To get an instance of a `CancellationToken` use a {@link CancellationTokenSource }.
(cancellation-requested? cancellation-token)
Is true
when the token has been cancelled, false
otherwise.
Returns: boolean
Is `true` when the token has been cancelled, `false` otherwise. **Returns:** `boolean`
(on-cancellation-requested cancellation-token)
(on-cancellation-requested cancellation-token listener)
(on-cancellation-requested cancellation-token listener this-args)
(on-cancellation-requested cancellation-token listener this-args disposables)
An {@link Event } which fires upon cancellation.
Parameters:
listener
: (e: T) => any
- The listener function will be called when the event happens.this-args
: any
- The this
-argument which will be used when calling the event listener.disposables
: Disposable[] | undefined
- An array to which a {@link Disposable } will be added.Returns: Disposable
- A disposable which unsubscribes the event listener.
An {@link Event } which fires upon cancellation. **Parameters:** - `listener`: `(e: T) => any` - The listener function will be called when the event happens. - `this-args`: `any` - The `this`-argument which will be used when calling the event listener. - `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added. **Returns:** `Disposable` - A disposable which unsubscribes the event listener.
(set-is-cancellation-requested! cancellation-token value)
Is true
when the token has been cancelled, false
otherwise.
Is `true` when the token has been cancelled, `false` otherwise.
(set-on-cancellation-requested! cancellation-token value)
An {@link Event } which fires upon cancellation.
An {@link Event } which fires upon cancellation.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close