class documentation

class GracefulInterface(Protocol): (source)

View In Hierarchy

Define components that support controlled asynchronous shutdown.

During shutdown, the channel calls close. This coroutine stops background tasks and releases resources.

Async Method close Perform asynchronous shutdown of the component.
async def close(self, grace: float | None = None): (source) ΒΆ

Perform asynchronous shutdown of the component.

Parameters
grace:float | NoneOptional grace period in seconds for the component to complete shutdown work.