Skip to content

Prevent deep multi-threading #263

@Lestropie

Description

@Lestropie

Many low-level operations are now multi-threaded. However if some high-level functionality is multi-threaded, and itself calls multi-threaded low-level operations, one could end up with e.g. 64 threads running instead of 8, which could cause slowdown.

It may be better to set an atomic flag to indicate that a multi-threaded process is running; and if another function requests number_of_threads(), it should return 0 and instead run in a strictly single-threaded manner, until the flag is released.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions