guybrush77 / rapidobj

A fast, header-only, C++17 library for parsing Wavefront .obj files.
MIT License
178 stars 16 forks source link

Limiting thread count support #26

Open P1nkL1on opened 5 months ago

P1nkL1on commented 5 months ago

In rapidobj.hpp:7085 the thread count is hardcoded to

auto num_threads = std::thread::hardware_concurrency();

Just asking if there is any chance to vary this from the ReadFile API or by altering some config/prefs. The usecase of that if user want to force rapidobj to load in 1 thread, e.x. while having parallelism on higher scale. Also, as far as i understand, single/multi threaded approach depends strictly on file size, which is clever, but not very flexible.