Skip to main content

synloop

Fallback blocking event loop for transports that doesn't support AIO.

def synloop(
obj: object,
connection: object,
consumer: object,
blueprint: object,
hub: object,
qos: object,
heartbeat: object,
clock: object,
hbrate: float = 2.0,
kwargs: dict
) - > null

Fallback blocking event loop for transports that doesn't support AIO.

Parameters

NameTypeDescription
objobjectThe worker or consumer object responsible for task handling, pending operations, and connection management.
connectionobjectThe transport connection instance used to drain incoming events and manage network communication.
consumerobjectThe message consumer that receives tasks and routes them to the task handler.
blueprintobjectThe execution blueprint used to track the current operational state and signal when the loop should terminate.
hubobjectThe event loop hub; it is reset upon failure to prevent stale callbacks from blocking re-registration.
qosobjectThe Quality of Service object used to manage and update message prefetch limits during the loop.
heartbeatobjectThe heartbeat configuration or monitor used to maintain the connection's liveness.
clockobjectThe logical or system clock used for timing operations within the loop.
hbratefloat = 2.0The rate at which AMQP heartbeats are sent, typically used when running in greenlet-based environments.
kwargsdictAdditional keyword arguments passed to the loop implementation.

Returns

TypeDescription
nullThis function does not return a value; it blocks until the blueprint state changes or the connection is lost.