pitrou commented on code in PR #39081:
URL: https://github.com/apache/arrow/pull/39081#discussion_r1417509757


##########
http/examples/get/client_async.py:
##########
@@ -0,0 +1,39 @@
+import asyncio
+import aiohttp

Review Comment:
   I think this is fetching the HTTP responses (potentially) in parallel - the 
part under `asyncio.run` -, but then decodes those HTTP responses serially - 
the regular `for` loop invoking `open_stream` on each response in turn.
   
   We would need to wire `StreamDecoder` into Python and provide a higher-level 
async IPC read API around it. This is probably off-topic for this.
   
   For now, you could just make the blocking client `client.py` parallel by 
using 
[ThreadPoolExecutor](https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.ThreadPoolExecutor).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to