public class CancellableContinuationKt
| Modifier and Type | Method and Description |
|---|---|
static void |
disposeOnCancellation(CancellableContinuation<?> $receiver,
DisposableHandle handle)
Disposes a specified handle when this continuation is cancelled.
|
static DisposableHandle |
disposeOnCompletion(CancellableContinuation<?> $receiver,
DisposableHandle handle)
Deprecated.
|
public static DisposableHandle disposeOnCompletion(CancellableContinuation<?> $receiver, DisposableHandle handle)
Disposes a specified handle when this continuation is cancelled.
This is a shortcut for the following code with slightly more efficient implementation (one fewer object created).
invokeOnCancellation { handle.dispose() }
public static void disposeOnCancellation(CancellableContinuation<?> $receiver, DisposableHandle handle)
Disposes a specified handle when this continuation is cancelled.
This is a shortcut for the following code with slightly more efficient implementation (one fewer object created).
invokeOnCancellation { handle.dispose() }