Closed olliNiinivaara closed 4 years ago
Weave will not spawn more threads that your logical processor count to avoid oversubscription. However you should have a message that tells you that the number of threads was truncated:
Ok, WEAVE_NUM_THREADS is really an OS environment parameter, not a Nim parameter that could be set with -d:WEAVE_NUM_THREADS=100. putEnv works. Problem solved.
No matter what number i give as compile parameter, like -d:WEAVE_NUM_THREADS=100 Weave seems to spawn at most 2 tasks at a time (on 4 core CPU running Linux).
some context: https://github.com/olliNiinivaara/GuildenStern/blob/4b52391f7b7b7eb676db60a11534327ae197566e/src/guildenstern/dispatcher.nim#L15
https://github.com/olliNiinivaara/GuildenStern/blob/4b52391f7b7b7eb676db60a11534327ae197566e/src/guildenstern/dispatcher.nim#L143
https://github.com/olliNiinivaara/GuildenStern/blob/4b52391f7b7b7eb676db60a11534327ae197566e/src/guildenstern/dispatcher.nim#L110
https://github.com/olliNiinivaara/GuildenStern/blob/4b52391f7b7b7eb676db60a11534327ae197566e/src/guildenstern/dispatcher.nim#L179-L180