summary refs log tree commit diff stats
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
parent2f3add99bb1928b7dbc483c711ae17028f913804 (diff)
downloadNim-49e93326615e0201ab2ba031e9aa3a1392818aa9.tar.gz
Use defaut nil callback for execProcesses
-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
:41 -0700 2812' href='/akkartik/mu/commit/html/024jump.cc.html?h=main&id=a654e4ecace2d506d1b10f1dde2c287ebe84ef37'>a654e4ec ^
4690ce81 ^
4690ce81 ^
a654e4ec ^



672e3e50 ^

a654e4ec ^





672e3e50 ^

a654e4ec ^
672e3e50 ^

c5ffb6e1 ^
4690ce81 ^
c5ffb6e1 ^
9570363a ^
c5ffb6e1 ^
a654e4ec ^

c5ffb6e1 ^

672e3e50 ^


76755b28 ^

4690ce81 ^

c842d90b ^
9542bb11 ^

2f02189d ^

9542bb11 ^

76755b28 ^


4690ce81 ^
65361948 ^
e8b1d3ff ^
76755b28 ^
e8b1d3ff ^
672e3e50 ^

c5ffb6e1 ^

76755b28 ^
672e3e50 ^

4690ce81 ^
672e3e50 ^
c5ffb6e1 ^
672e3e50 ^


a654e4ec ^


672e3e50 ^



76755b28 ^

4690ce81 ^

c842d90b ^
9542bb11 ^

4690ce81 ^
2f02189d ^
9542bb11 ^

2f02189d ^

9542bb11 ^

2f02189d ^
76755b28 ^


4690ce81 ^
65361948 ^
4690ce81 ^
76755b28 ^
672e3e50 ^

e8b1d3ff ^
76755b28 ^
e8b1d3ff ^
672e3e50 ^


4690ce81 ^

9570363a ^
672e3e50 ^
a654e4ec ^
672e3e50 ^
a654e4ec ^
c5ffb6e1 ^
672e3e50 ^

4690ce81 ^

9570363a ^
672e3e50 ^
a654e4ec ^
672e3e50 ^
a654e4ec ^
672e3e50 ^




76755b28 ^

4690ce81 ^

c842d90b ^
9542bb11 ^

4690ce81 ^
2f02189d ^
9542bb11 ^

2f02189d ^

9542bb11 ^

2f02189d ^
76755b28 ^


4690ce81 ^
65361948 ^
4690ce81 ^
76755b28 ^
672e3e50 ^

e8b1d3ff ^
76755b28 ^
e8b1d3ff ^
672e3e50 ^


4690ce81 ^
9570363a ^

672e3e50 ^
a654e4ec ^
672e3e50 ^
a654e4ec ^
c5ffb6e1 ^
672e3e50 ^

4690ce81 ^
9570363a ^

672e3e50 ^
a654e4ec ^
672e3e50 ^
a654e4ec ^
672e3e50 ^



a654e4ec ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194