Skip to content

Commit

Permalink
3.4.0: semaphore swap
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Jul 14, 2021
1 parent 2502f6c commit 602cb62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions balls.nimble
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
version = "3.3.7"
version = "3.4.0"
author = "disruptek"
description = "a unittest framework with balls 🔴🟡🟢"
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
Expand Down
6 changes: 2 additions & 4 deletions balls/runner.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`)
Expand Down

0 comments on commit 602cb62

Please sign in to comment.