# libtmux.async/close-runtime!

- **Module:** libtmux.async
- **Package:** io.github.libtmux:libtmux-clojure
- **Language:** Clojure
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-java/blob/5f88402151ff08fc0390dd438b90963692ec3fe4/libtmux-clojure/src/main/clojure/libtmux/async.clj#L332
- **Public owner:** libtmux.async
- **Page:** https://libtmux.org/en/clojure/latest/reference/libtmux-async-close-runtime/

```
(close-runtime! runtime)
```

Cancels owned tasks and callbacks and shuts down the runtime's executors.

Waits within `:close-timeout-ms.` Interruption-resistant work can outlive that
budget; it cannot be forcibly stopped. Pending cleanup throws `ex-info` with
`:tmux/error` `:cleanup-pending.` Safe to call again; returns `nil` after cleanup.
[[task-state]] keeps incomplete cleanup observable; [[cancel!]] targets one task.

## Parameters

- `runtime` (`libtmux.async.AsyncRuntime`)
