-
Hi folks,
async for posted_event in http_io_channel.event_stream():
the_core.push_event(posted_event) We can of course use ...
event_stream_futures = []
async def event_stream(self):
"""Custom generator interface."""
while True:
future = asyncio.Future()
event_stream_futures.append(future)
await future
yield future.result()
async def post_handler(request):
"""Callback as wanted by aiohttp."""
body = await request.text()
prev_futures = event_stream_futures
event_stream_futures = []
for future in prev_futures:
future.set_result(convert_checkresult_body_to_event(body))
return aiohttp.web.Response() Is this the way to go? Or is awaiting on upcoming requests already built into |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There is no embedded queue. |
Beta Was this translation helpful? Give feedback.
There is no embedded queue.
A custom queue-based approach should work, sure.