paleolimbot opened a new pull request, #36304:
URL: https://github.com/apache/arrow/pull/36304

   ### Rationale for this change
   
   Setting the number of threads in the IO thread pool to 1 causes a hang or 
crash when using some functions (notably: any Acero exec plan).
   
   ### What changes are included in this PR?
   
   `set_io_thread_count()` now warns for `num_threads == 1`:
   
   ``` r
   library(arrow, warn.conflicts = FALSE)
   #> Some features are not enabled in this build of Arrow. Run `arrow_info()` 
for more information.
   
   # Already errors from C++
   set_io_thread_count(0)
   #> Error: Invalid: ThreadPool capacity must be > 0
   # New warning!
   set_io_thread_count(1)
   #> Warning: `arrow::set_io_thread_count()` with num_threads < 2 may
   #> cause certain operations to hang or crash.
   #> ℹ Use num_threads >= 2 to support all operations
   # No warning!
   set_io_thread_count(2)
   ```
   
   <sup>Created on 2023-06-26 with [reprex 
v2.0.2](https://reprex.tidyverse.org)</sup>
   
   ### Are these changes tested?
   
   Yes
   
   ### Are there any user-facing changes?
   
   Yes: some existing code may issue a warning that previously did not. 
Documentation was added.


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