Control.withSession
LibTmux.FSharp Opens a control client, runs work, and disposes the client after the returned task completes.
Source and package
- Module
- LibTmux.FSharp
- Declared in
- Control
- Package
- LibTmux.FSharp
- Source
- src/LibTmux.FSharp/Control.fsi
- F# value signatures Declares the name and type of a value or function in a signature. Language documentation withSession: cancellationToken: Cancellation
Token -> work: (IControlMode -> Task<'State>) -> server: LibSession Tmux -> Task<'State>.Server -
Description#
The cancellation token starts the client; the work function forwards its own token. Like <c>enter</c>, the client attaches to the most recently used session; for a chosen one, pass <c>enterSession</c>'s client to <c>useSession</c>.
- Parameters
-
-
cancellationToken ( Cancellation
Token ) -
work ( (IControl
Mode -> Task<'State>) )Session -
server ( Lib
Tmux ).Server
-
Discussed in Commands and control mode · Execution modes , Quick start , Streams and cleanup