krlmlr commented on PR #985:
URL: https://github.com/apache/arrow-adbc/pull/985#issuecomment-2120921024

   Thanks, Dewey. I was really thinking about:
   
   ```r
   some_con |>
     adbc_async_prepare() %...>%
     adbc_async_execute_query() %...>%
     adbc_async_fetch_chunk() %...>%
     adbc_async_fetch_chunk() %...>%
     adbc_async_fetch_chunk() %...>%
     ...
   ```
   
   With:
   
   ```r
   adbc_async_fetch_chunk <- function() {
     if (fetch_thread_running()) {
       ask_fetch_thread_get_more_data()
     } else {
       start_new_fetch_thread()
     }
   }
   ```
   
   Avoiding race conditions is left as an exercise to the reader 🤣 


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