INNER CODE UNIT · Python
BroadcasterAlreadyStarted
permitio/fastapi_websocket_pubsub · fastapi_websocket_pubsub/event_broadcaster.py:29
class BroadcasterAlreadyStarted(EventBroadcasterException):
pass
class EventBroadcasterContextManager:
"""
Manages the context for the EventBroadcaster
Friend-like class of EventBroadcaster (accessing "protected" members )
"""
def __init__(
self,
event_broadcaster: "EventBroadcaster",
listen: bool = True,
share: bool = True,
) -> None:
"""
Provide a context manager for an EventBroadcaster, managing if it listens to events coming from the broadcaster