Sorry to belabor the point but getting this right is important to me and I am unable to verify what you guys are saying. I really can't see how using createThread is giving me the WRONG number of threads. From the documentation: import std/locks var thr: array[0..4, Thread[tuple[a,b: int]]] L: Lock proc threadFunc(interval: tuple[a,b: int]) {.thread.} = for i in interval.a..interval.b: acquire(L) # lock stdout echo i release(L) initLock(L) for i in 0..high(thr): createThread(thr[i], threadFunc, (i*10, i*10+5)) joinThreads(thr) deinitLock(L) Run
The code explicitly creates 5 threads. Running the code results in 5 threads being created. So this seems to be working exactly as expected?