Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
31
class
Publisher:
Callers
1
test_provider_shall_update_affected_subscribers_with_published_subscription
Method · 0.95
Calls
2
run
Method · 0.80
get
Method · 0.45
Tested by
1
test_provider_shall_update_affected_subscribers_with_published_subscription
Method · 0.76