# LibTmux.FSharp.TmuxAsync

- **Module:** LibTmux.FSharp
- **Package:** LibTmux.FSharp
- **Language:** F#
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux.FSharp/Library.fsi#L125
- **Page:** https://libtmux.org/en/fsharp/latest/reference/libtmux-fsharp-tmuxasync/

```
module TmuxAsync
```

Awaits tasks in an <c>async</c> workflow without losing whether tmux may have acted.

<c>Async.AwaitTask</c> turns a <c>TmuxOperationCanceledException</c> into a bare
<c>TaskCanceledException</c>, losing <c>CommandMayHaveExecuted</c>, and wraps a failure in an
<c>AggregateException</c>. These raise a tmux client cancelled after it may have acted as itself,
so <c>TmuxFailure.MayHaveRun</c> matches it in <c>try ... with</c>; any other cancellation cancels
the workflow, and a failure is raised as the task raised it.

## Members

### Common operations

- `awaitTask` (function): Awaits a task that returns a value.
- `awaitUnitTask` (function): Awaits a task that returns nothing.
