forked from p15670423/monkey
Common: Add comment about subscribing to all topics in PyPubSubEventQueue
This commit is contained in:
parent
f26beb6464
commit
2fd66bc9e2
|
@ -12,6 +12,12 @@ class PyPubSubEventQueue(IEventQueue):
|
|||
self._pypubsub_publisher = pypubsub_publisher
|
||||
|
||||
def subscribe_all(self, subscriber: Callable[[AbstractEvent], None]):
|
||||
# From the documentation (https://pypubsub.readthedocs.io/en/v4.0.3/usage/
|
||||
# usage_advanced_debug.html#listen-for-messages-from-all-topics):
|
||||
# "PyPubSub defines a special topic named pub.ALL_TOPICS. A listener that subscribes
|
||||
# to this topic will receives all messages of every topic. By default, the listener
|
||||
# will not receive any data since pub.ALL_TOPICS is the parent of all root topics (...)"
|
||||
|
||||
self._pypubsub_publisher.subscribe(
|
||||
listener=subscriber, topicName=self._pypubsub_publisher.ALL_TOPICS
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue