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
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for controlling cancellation and timeouts during the wait operation. |
Returns
| Type | Description |
|---|---|
error | An 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
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for controlling cancellation and timeouts during the wait operation. |
Returns
| Type | Description |
|---|---|
error | An error if the context is cancelled or an issue occurs while waiting for the signal. |