Commits


Antoine Pitrou authored and Korn, Uwe committed da3f843c156
ARROW-2569: [C++] Improve thread pool size heuristic The heuristic goes this way: - if the OMP_NUM_THREADS environment variable exists, it defines the baseline number of available threads - otherwise, the baseline is the value returned by std::thread::harware_concurrency() - the OMP_THREAD_LIMIT environment variable, if it exists, defined the upper bound for the final value, i.e. we return min(baseline, limit), otherwise we just return the baseline. This is the heuristic used by other packages such as the GNU "nproc" utility. Author: Antoine Pitrou <antoine@python.org> Closes #2026 from pitrou/ARROW-2569-thread-pool-heuristic and squashes the following commits: 5572b075 <Antoine Pitrou> Factor out environment variable helpers 2dd0d12e <Antoine Pitrou> ARROW-2569: Improve thread pool size heuristic