Ivan mentioned that hardware_concurrency() will return 0 if information about available threads is not available.