You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (JIRA)" <ji...@apache.org> on 2018/04/19 19:45:00 UTC

[jira] [Commented] (ARROW-2479) [C++] Have a global thread pool

    [ https://issues.apache.org/jira/browse/ARROW-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444687#comment-16444687 ] 

Antoine Pitrou commented on ARROW-2479:
---------------------------------------

LLVM has something simple enough that we can probably adapt and re-use :
https://llvm.org/doxygen/ThreadPool_8h_source.html
https://llvm.org/doxygen/ThreadPool_8cpp_source.html

Other publicly-available libraries seem either poorly tested or come with quirks (such as depending on boost).

> [C++] Have a global thread pool
> -------------------------------
>
>                 Key: ARROW-2479
>                 URL: https://issues.apache.org/jira/browse/ARROW-2479
>             Project: Apache Arrow
>          Issue Type: Wish
>          Components: C++
>            Reporter: Antoine Pitrou
>            Priority: Major
>
> A few parts of Arrow have started spawning threads to parallelize CPU-bound tasks. They do so by launching a hard-coded number of threads, disregarding machine configuration or the fact that Arrow itself might be used from several threads at once (so hardcoding 8 threads might end up launch N * 8 threads if the user is calling Arrow from N threads at once...).
> Instead we probably want a global thread pool policy, with a singleton thread pool for CPU-bound tasks (using, by default, a number of threads equal to the machine's capacity).
> See discussion in [https://github.com/apache/arrow/pull/1893]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)