Skip to content

[REQ]Handle cases where hardware_concurrency() returns 0 #52

@bstamour

Description

@bstamour

std::thread::hardware_concurrency should only be treated as a hint

C++'s std::thread::hardware_concurrency() is allowed to return 0 if it cannot compute the value for you. From a cursory reading of the code: if this were to happen, you will have an empty thread pool. It may be better to use a value of 1 in that case, so that you can still submit work.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions