We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e71cf8c commit efb7512Copy full SHA for efb7512
docs/howto/patterns.rst
@@ -101,7 +101,7 @@ messages at one, an in-process queue can be leveraged::
101
for message in websocket:
102
await queue.put(message)
103
104
- async def worker():
+ async def worker(websocket):
105
while True:
106
message = await queue.get()
107
result = await long_running_task(message)
@@ -111,7 +111,7 @@ messages at one, an in-process queue can be leveraged::
111
async with asyncio.TaskGroup() as tg:
112
tg.create_task(consumer_handler(websocket))
113
for _ in range(MAX_WORKERS):
114
- tg.create_task(worker())
+ tg.create_task(worker(websocket))
115
116
Registration
117
------------
0 commit comments