pitrou commented on issue #34607:
URL: https://github.com/apache/arrow/issues/34607#issuecomment-1966857840

   Well, `with pool` will wait for the all the pool's tasks to finish, so this 
is probably not right. Perhaps try:
   ```python
   flight_executor = concurrent.futures.ThreadPoolExecutor(max_workers=16)
   
   async def run_concurrent(client, num_requests):
       loop = asyncio.get_running_loop()
       tasks = []
       start = time.time()
       for _ in range(num_requests):
           func = partial(send_concurrent_request, client, table, descriptor)
           tasks.append(loop.run_in_executor(flight_executor, func))
   
       await asyncio.gather(*tasks)
       ...
   ```


-- 
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