mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
threadpool.nim: allow control over MaxThreadPoolSize and MaxDistinguishedThread; refs #10584
This commit is contained in:
@@ -317,9 +317,9 @@ proc nimArgsPassingDone(p: pointer) {.compilerProc.} =
|
||||
signal(w.taskStarted)
|
||||
|
||||
const
|
||||
MaxThreadPoolSize* = 256 ## Maximum size of the thread pool. 256 threads
|
||||
## should be good enough for anybody ;-)
|
||||
MaxDistinguishedThread* = 32 ## Maximum number of "distinguished" threads.
|
||||
MaxThreadPoolSize* {.intdefine.} = 256 ## Maximum size of the thread pool. 256 threads
|
||||
## should be good enough for anybody ;-)
|
||||
MaxDistinguishedThread* {.intdefine.} = 32 ## Maximum number of "distinguished" threads.
|
||||
|
||||
type
|
||||
ThreadId* = range[0..MaxDistinguishedThread-1]
|
||||
|
||||
Reference in New Issue
Block a user