MCPcopy
hub / github.com/mitmproxy/mitmproxy / _SyncSignal

Class _SyncSignal

mitmproxy/utils/signals.py:68–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67
68class _SyncSignal(Generic[P], _SignalMixin):
69 def connect(self, receiver: Callable[P, None]) -> None:
70 assert not inspect.iscoroutinefunction(receiver)
71 super().connect(receiver)
72
73 def disconnect(self, receiver: Callable[P, None]) -> None:
74 super().disconnect(receiver)
75
76 def send(self, *args: P.args, **kwargs: P.kwargs) -> None:
77 for ret in super().notify(*args, **kwargs):
78 assert ret is None or not inspect.isawaitable(ret)
79
80
81class _AsyncSignal(Generic[P], _SignalMixin):

Callers 1

SyncSignalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…