# CancellationHandle

Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/CancellationHandle.kt+class:androidx.compose.runtime.CancellationHandle) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.10.0) Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  fun interface CancellationHandle
  ```

*** ** * ** ***

Implementations of this interface can be used to cancel an ongoing operation or unregister a listener by calling `https://developer.android.com/reference/kotlin/androidx/compose/runtime/CancellationHandle#cancel()`.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/CancellationHandle#cancel()()` Cancels the operation that this handle was returned for. | Cmn |

## Public functions

### cancel

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.10.0)

```
fun cancel(): Unit
```

Cancels the operation that this handle was returned for. Implementations of this method should be idempotent. Callers should be able to cancel the same handle a second time without causing any externally visible effects.