Skip to content

Move available_parallelism() into utility function #13591

@Dandandan

Description

@Dandandan

Is your feature request related to a problem or challenge?

As noted by @comphead in #13579 (review)
We can move the repeated:

available_parallelism()
             .unwrap_or(NonZero::new(1).unwrap())
             .get()

into a seperate method.

Describe the solution you'd like

Create a utility method and replace all calls to std:thread::available_parallelism with this new method.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions