Share via


thread::hardware_concurrency Method

Static method that returns an estimate of the number of hardware thread contexts.

static unsigned int hardware_concurrency() _NOEXCEPT;

Return Value

An estimate of the number of hardware thread contexts. If the value cannot be computed or is not well defined, this method returns 0.

Requirements

Header: thread

Namespace: std

See Also

Reference

thread Class

<thread>