Skip to main content

SignalWatcher

No overview available.

Methods


WaitToStart()

@classmethod
def WaitToStart(
ctx: context.Context
) - > error

Waits for a start signal, blocking execution until the signal is received. This is used to synchronize the start of operations with an external event or signal.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for controlling cancellation and timeouts during the wait operation.

Returns

TypeDescription
errorAn error if the context is cancelled or an issue occurs while waiting for the signal.

WaitToExit()

@classmethod
def WaitToExit(
ctx: context.Context
) - > error

Waits for an exit signal, blocking execution until the signal is received. This is typically used to gracefully shut down an application or process when an external exit signal is sent.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for controlling cancellation and timeouts during the wait operation.

Returns

TypeDescription
errorAn error if the context is cancelled or an issue occurs while waiting for the signal.