MCPcopy Index your code
hub / github.com/faif/python-patterns / update

Method update

patterns/behavioral/publish_subscribe.py:24–28  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 self.subscribers[msg].remove(subscriber)
23
24 def update(self) -> None:
25 for msg in self.msg_queue:
26 for sub in self.subscribers.get(msg, []):
27 sub.run(msg)
28 self.msg_queue = []
29
30
31class Publisher:

Calls 2

runMethod · 0.80
getMethod · 0.45