From bdb653c4156af099814df2e21b9878cdb1591190 Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Mon, 17 Jul 2017 09:09:21 +0300 Subject: [PATCH] GC_fullCollect on sync threadpool (#6107) --- lib/pure/concurrency/threadpool.nim | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/pure/concurrency/threadpool.nim b/lib/pure/concurrency/threadpool.nim index cf4f585883..9e19e47b57 100644 --- a/lib/pure/concurrency/threadpool.nim +++ b/lib/pure/concurrency/threadpool.nim @@ -526,10 +526,12 @@ proc nimSpawn4(fn: WorkerProc; data: pointer; id: ThreadId) {.compilerProc.} = if selectWorker(addr(distinguishedData[id]), fn, data): break await(distinguishedData[id].readyForTask) +template spawnInAllThreads(e: untyped) = + ## Spawn `e` on all of the threadpool threads. + for i in 0 ..