mirror of
https://github.com/storytold/EventCenterPlugin.git
synced 2026-10-09 00:09:42 +00:00
new pattern for handling the redis results
This commit is contained in:
@@ -28,7 +28,9 @@ async def server(websocket, path):
|
||||
|
||||
mpsc = Receiver(loop=loop)
|
||||
async def reader(mpsc):
|
||||
print('foo', flush=True)
|
||||
async for channel, msg in mpsc.iter():
|
||||
print('bar', flush=True)
|
||||
assert isinstance(channel, AbcChannel)
|
||||
print("Got {!r} in channel {!r}".format(msg, channel))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user