CancellationToken.canBeCancelled 方法

定义

Specifies if the Cancellation token can be cancelled or not. If the system.fabric.CancellationToken is created using getToken(), then the token can cancelled using cancel() method. If the system.fabric.CancellationToken is created using getDefault(), then it can not be cancelled. It simply acts as a dummy token.

public boolean canBeCancelled()

返回

boolean

Returns true if the token can be cancelled, else false.

适用于