[Runtime] use pthread_getaffinity_np to determine default worker count
Compare changes
+ 17
− 0
@@ -264,6 +264,23 @@ auto Runtime::getDefaultWorkerCount() -> workerid_t {
The value reported by std::thread::hardware_concurrency()
can be more than the actually available CPUs for example in a container or qemu.
pthread_getaffinity_np
fills a CPU set with all CPU a thread can be scheduled on.
Fixes #19 (closed).