ChatActionHandle
in package
FinalYes
A handle returned by {@see ChatActionSender::start()}.
Calling stop() signals the background chat-action loop to terminate
and blocks until the loop fiber has exited. Multiple calls to stop() are
safe — subsequent calls after the first are no-ops.
Mirrors the __aexit__ / close() path of upstream
aiogram.utils.chat_action.ChatActionSender.
Table of Contents
Properties
- $closeSignal : DeferredFuture
- $stopped : bool
- $task : Future
Methods
- __construct() : mixed
- stop() : void
- Stop the background chat-action loop and wait for it to exit.
Properties
$closeSignal read-only
private
DeferredFuture
$closeSignal
$stopped
private
bool
$stopped
= false
$task read-only
private
Future
$task
Methods
__construct()
public
__construct(Future<string|int, null> $task, DeferredFuture<string|int, null> $closeSignal) : mixed
Parameters
- $task : Future<string|int, null>
-
Background loop future (from Amp\async).
- $closeSignal : DeferredFuture<string|int, null>
-
Resolved to stop the loop.
stop()
Stop the background chat-action loop and wait for it to exit.
public
stop() : void
Idempotent — multiple calls are safe.