-
Notifications
You must be signed in to change notification settings - Fork 197
Prevent deep multi-threading #263
Copy link
Copy link
Closed
Description
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.
Reactions are currently unavailable