# libtmux.async

- **Module:** libtmux.async
- **Package:** io.github.libtmux:libtmux-clojure
- **Language:** Clojure
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-java/blob/5f88402151ff08fc0390dd438b90963692ec3fe4/libtmux-clojure/src/main/clojure/libtmux/async.clj#L1
- **Page:** https://libtmux.org/en/clojure/latest/reference/libtmux-async/

```
(ns libtmux.async)
```

Bounded owned workers from [[runtime!]] and cancellable [[submit!]] tasks.

[[completion-stage]] and [[then!]] expose Java interop with explicit scheduling.

## Members

### Common operations

- [`cancel!`](/en/clojure/latest/reference/libtmux-async-cancel/) (function): Requests cancellation. The first accepted cancellation reason wins.
- [`runtime!`](/en/clojure/latest/reference/libtmux-async-runtime/) (function): Creates a closeable runtime owning bounded work, wait and callback lanes.
- [`then!`](/en/clojure/latest/reference/libtmux-async-then/) (function): Returns a read-only CompletionStage applying `f` after successful task cleanup.
- [`submit!`](/en/clojure/latest/reference/libtmux-async-submit/) (function): Submits a zero-argument function with the caller's dynamic bindings.

### Other members

- [`close-runtime!`](/en/clojure/latest/reference/libtmux-async-close-runtime/) (function): Cancels owned tasks and callbacks and shuts down the runtime's executors.
- [`completion-stage`](/en/clojure/latest/reference/libtmux-async-completion-stage/) (function): Returns a read-only CompletionStage completed after worker cleanup.
- [`task-kind`](/en/clojure/latest/reference/libtmux-async-task-kind/) (function): Returns the declared `:ordinary` or `:wait` lane without waiting for the task.
- [`task-state`](/en/clojure/latest/reference/libtmux-async-task-state/) (function): Reads task progress: `:queued`, `:running`, `:cancelling`, `:cleanup-pending`,

## Guides

Pages that discuss `libtmux.async`.

- [Getting started](/en/clojure/latest/guides/getting-started/)
