Function web_thread::available_parallelism

source ·
pub fn available_parallelism() -> Result<NonZeroUsize>
Expand description

See std::thread::available_parallelism().

§Notes

Browsers might return lower values, a common case is to prevent fingerprinting.

§Errors

This function will return an error if called from a worklet or any other unsupported thread type.