# Pastebin aePIpdxx so ... proc initThreadPool(): ThreadPool = newThreadPool(countProcessors(), 0) var astronPool {.threadvar.}: ThreadPool in handler ... ... if astronPool.isNil: astronPool = initThreadPool() ... astronPool.spawn foo