summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorErwan Ameil <wan@idlewan.com>2014-11-02 16:06:01 +0100
committerErwan Ameil <wan@idlewan.com>2014-11-02 16:06:01 +0100
commit49e93326615e0201ab2ba031e9aa3a1392818aa9 (patch)
treec6adc0ea5f5da3575ac404a8e858ecbe162d4830 /lib/pure
parent2f3add99bb1928b7dbc483c711ae17028f913804 (diff)
downloadNim-49e93326615e0201ab2ba031e9aa3a1392818aa9.tar.gz
Use defaut nil callback for execProcesses
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/osproc.nim12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index d51a2b224..71ca51764 100644
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -236,7 +236,7 @@ proc countProcessors*(): int {.rtl, extern: "nosp$1".} =
 proc execProcesses*(cmds: openArray[string],
                     options = {poStdErrToStdOut, poParentStreams},
                     n = countProcessors(),
-                    beforeRunEvent: proc(idx: int)): int
+                    beforeRunEvent: proc(idx: int) = nil): int
                     {.rtl, tags: [ExecIOEffect, TimeEffect, ReadEnvEffect, RootEffect]} =
   ## executes the commands `cmds` in parallel. Creates `n` processes
   ## that execute in parallel. The highest return value of all processes
@@ -295,16 +295,6 @@ proc execProcesses*(cmds: openArray[string],
       result = max(waitForExit(p), result)
       close(p)
 
-proc execProcesses*(cmds: openArray[string],
-                    options = {poStdErrToStdOut, poParentStreams},
-                    n = countProcessors()): int
-                    {.rtl, extern: "nosp$1",
-                    tags: [ExecIOEffect, TimeEffect, ReadEnvEffect, RootEffect]} =
-  ## executes the commands `cmds` in parallel. Creates `n` processes
-  ## that execute in parallel. The highest return value of all processes
-  ## is returned.
-  return execProcesses(cmds, options, n, nil)
-
 proc select*(readfds: var seq[Process], timeout = 500): int
   ## `select` with a sensible Nim interface. `timeout` is in miliseconds.
   ## Specify -1 for no timeout. Returns the number of processes that are