# LibTmux.TmuxWaitChannel.DisposeAsync

- **Module:** LibTmux.TmuxWaitChannel
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Waiting/TmuxWaitChannel.cs#L121
- **Page:** https://libtmux.org/reference/dotnet/libtmux-tmuxwaitchannel-disposeasync/

```
LibTmux.TmuxWaitChannel.DisposeAsync() -> ValueTask
```

Withdraws the waiter from tmux.

Signalling the channel is how a waiter withdraws: tmux wakes the
registered waiters and, because the list was not empty, leaves the
pending flag down. Nothing else can deregister one.

A signal landing between the check below and the withdrawal is woken by
this waiter and then re-raised by the withdrawal itself, because by then
no waiter is left to take it. That leaves the channel pending rather
than empty — an extra wake for the next caller, never a lost one. tmux
cannot say which signal completed this waiter in that race.

A signal wakes every waiter on the channel and tmux offers no way to
deregister one on its own, so withdrawing here also completes any other
wait open on the same channel. Keep one open wait per channel.

A wait that did not dispatch or returned a command failure never
registered, so disposal does not signal it. Command failures and
cancellation remain cleanup-only; other failures remain observable.
