You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
The example for the subscriber in the PubSub system is not truly async and is using while True statement plus asyncio.sleep.
As you see the code is not waiting for notification from IO, instead, it is trying to check if there is a new message every 0.1 seconds.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The example for the subscriber in the PubSub system is not truly async and is using
while True
statement plusasyncio.sleep
.As you see the code is not waiting for notification from IO, instead, it is trying to check if there is a new message every 0.1 seconds.
It can be replaced with the code below which is truly asyncIO.
Beta Was this translation helpful? Give feedback.
All reactions