* fixes #18858 [backport] * ensure async tests work with --experimental:strictEffects [backport] * ensure async tests work with --experimental:strictEffects [backport]
This commit is contained in:
parent
ca51bb8fd9
commit
3241df2a13
4 changed files with 11 additions and 3 deletions
|
|
@ -330,12 +330,16 @@ proc countProcessors*(): int {.rtl, extern: "nosp$1".} =
|
|||
## It is implemented just calling `cpuinfo.countProcessors`.
|
||||
result = cpuinfo.countProcessors()
|
||||
|
||||
when not defined(nimHasEffectsOf):
|
||||
{.pragma: effectsOf.}
|
||||
|
||||
proc execProcesses*(cmds: openArray[string],
|
||||
options = {poStdErrToStdOut, poParentStreams}, n = countProcessors(),
|
||||
beforeRunEvent: proc(idx: int) = nil,
|
||||
afterRunEvent: proc(idx: int, p: Process) = nil):
|
||||
int {.rtl, extern: "nosp$1",
|
||||
tags: [ExecIOEffect, TimeEffect, ReadEnvEffect, RootEffect].} =
|
||||
tags: [ExecIOEffect, TimeEffect, ReadEnvEffect, RootEffect],
|
||||
effectsOf: [beforeRunEvent, afterRunEvent].} =
|
||||
## Executes the commands `cmds` in parallel.
|
||||
## Creates `n` processes that execute in parallel.
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue