Core LibraryAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

function LibTmux.jl latest

on_cancel

Module LibTmux.on_cancel LibTmux
Source and package
Module
LibTmux
Package
LibTmux
Source
src/process.jl

Methods#

Register a callable and return a CancellationSubscription . cancel! invokes each registered callback once, outside the token lock, on its calling task. If already cancelled, invoke f() before returning. Keep callbacks prompt: signal an event or stop an owned process; do not wait for operation completion. Callback failures are collected after all callbacks run and raised together.

on_cancel(f, token::CancellationToken)

Closing a subscription prevents later invocation and joins a callback already running on another task. Close subscriptions when their operation retires.

Parameters
Esc

Type to search.

Reference preview Open reference