From 602cb62ec1da5422cd71f3f1c3e9926a38ee6f14 Mon Sep 17 00:00:00 2001 From: Andy Davidoff Date: Wed, 14 Jul 2021 09:26:22 -0400 Subject: [PATCH] 3.4.0: semaphore swap --- balls.nimble | 5 +++-- balls/runner.nim | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/balls.nimble b/balls.nimble index de4e0b6..5a32471 100644 --- a/balls.nimble +++ b/balls.nimble @@ -1,4 +1,4 @@ -version = "3.3.7" +version = "3.4.0" author = "disruptek" description = "a unittest framework with balls 🔴🟡🟢" license = "MIT" @@ -6,7 +6,8 @@ license = "MIT" # requires newTreeFrom requires "https://github.com/disruptek/grok >= 0.5.0 & < 1.0.0" requires "https://github.com/disruptek/ups < 1.0.0" -requires "https://github.com/disruptek/semaphores >= 0.0.4 & < 1.0.0" +requires "https://github.com/planetis-m/sync >= 1.0.0 & < 2.0.0" +#requires "https://github.com/c-blake/cligen < 2.0.0" bin = @["balls"] # build the binary for basic test running installExt = @["nim"] # we need to install balls.nim also diff --git a/balls/runner.nim b/balls/runner.nim index b102263..683658d 100644 --- a/balls/runner.nim +++ b/balls/runner.nim @@ -14,7 +14,7 @@ when not compileOption"threads": import std/rlocks import ups/sanitize -import semaphores +import sync/semaphore import balls/spec import balls/style @@ -82,9 +82,7 @@ proc `$`(p: Profile): string = proc corePhore(): Semaphore = ## produce a semaphore according to the number of available cores - result.init 314 - for core in 1 .. countProcessors(): - signal result + result.init countProcessors() template cmper(f: untyped) {.dirty.} = result = system.cmp(a.`f`, b.`f`)