|
70 | 70 | "cell_type": "code", |
71 | 71 | "execution_count": null, |
72 | 72 | "metadata": {}, |
73 | | - "outputs": [ |
74 | | - { |
75 | | - "name": "stdout", |
76 | | - "output_type": "stream", |
77 | | - "text": [ |
78 | | - "first\n" |
79 | | - ] |
80 | | - } |
81 | | - ], |
| 73 | + "outputs": [], |
82 | 74 | "source": [ |
83 | 75 | "@threaded\n", |
84 | 76 | "def _1():\n", |
|
110 | 102 | "cell_type": "code", |
111 | 103 | "execution_count": null, |
112 | 104 | "metadata": {}, |
113 | | - "outputs": [], |
| 105 | + "outputs": [ |
| 106 | + { |
| 107 | + "name": "stdout", |
| 108 | + "output_type": "stream", |
| 109 | + "text": [ |
| 110 | + "first\n" |
| 111 | + ] |
| 112 | + } |
| 113 | + ], |
114 | 114 | "source": [ |
115 | 115 | "@startthread\n", |
116 | 116 | "def _():\n", |
|
160 | 160 | "name": "stdout", |
161 | 161 | "output_type": "stream", |
162 | 162 | "text": [ |
163 | | - "firstsecond\n", |
164 | | - "\n" |
| 163 | + "first\n" |
165 | 164 | ] |
166 | 165 | } |
167 | 166 | ], |
|
194 | 193 | " if self.not_parallel: max_workers=1\n", |
195 | 194 | " super().__init__(max_workers, **kwargs)\n", |
196 | 195 | "\n", |
197 | | - " def map(self, f, items, timeout=None, chunksize=1, *args, **kwargs):\n", |
| 196 | + " def map(self, f, items, *args, timeout=None, chunksize=1, **kwargs):\n", |
198 | 197 | " self.lock = Manager().Lock()\n", |
199 | 198 | " g = partial(f, *args, **kwargs)\n", |
200 | 199 | " if self.not_parallel: return map(g, items)\n", |
|
219 | 218 | " if self.not_parallel: max_workers=1\n", |
220 | 219 | " super().__init__(max_workers, **kwargs)\n", |
221 | 220 | "\n", |
222 | | - " def map(self, f, items, timeout=None, chunksize=1, *args, **kwargs):\n", |
| 221 | + " def map(self, f, items, *args, timeout=None, chunksize=1, **kwargs):\n", |
223 | 222 | " self.lock = Manager().Lock()\n", |
224 | 223 | " g = partial(f, *args, **kwargs)\n", |
225 | 224 | " if self.not_parallel: return map(g, items)\n", |
|
238 | 237 | "text/markdown": [ |
239 | 238 | "<h4 id=\"ProcessPoolExecutor\" class=\"doc_header\"><code>class</code> <code>ProcessPoolExecutor</code><a href=\"\" class=\"source_link\" style=\"float:right\">[source]</a></h4>\n", |
240 | 239 | "\n", |
241 | | - "> <code>ProcessPoolExecutor</code>(**`max_workers`**=*`64`*, **`on_exc`**=*`print`*, **`pause`**=*`0`*, **\\*\\*`kwargs`**) :: [`ProcessPoolExecutor`](/03a.html#ProcessPoolExecutor)\n", |
| 240 | + "> <code>ProcessPoolExecutor</code>(**`max_workers`**=*`64`*, **`on_exc`**=*`print`*, **`pause`**=*`0`*, **\\*\\*`kwargs`**) :: [`ProcessPoolExecutor`](/parallel.html#ProcessPoolExecutor)\n", |
242 | 241 | "\n", |
243 | 242 | "Same as Python's ProcessPoolExecutor, except can pass `max_workers==0` for serial execution" |
244 | 243 | ], |
|
258 | 257 | "cell_type": "code", |
259 | 258 | "execution_count": null, |
260 | 259 | "metadata": {}, |
261 | | - "outputs": [ |
262 | | - { |
263 | | - "name": "stdout", |
264 | | - "output_type": "stream", |
265 | | - "text": [ |
266 | | - "second\n" |
267 | | - ] |
268 | | - } |
269 | | - ], |
| 260 | + "outputs": [], |
270 | 261 | "source": [ |
271 | 262 | "#export\n", |
272 | 263 | "try: from fastprogress import progress_bar\n", |
|
377 | 368 | "name": "stdout", |
378 | 369 | "output_type": "stream", |
379 | 370 | "text": [ |
380 | | - "0 2020-11-27 09:27:28.845698\n", |
381 | | - "1 2020-11-27 09:27:29.096662\n", |
382 | | - "2 2020-11-27 09:27:29.347888\n", |
383 | | - "3 2020-11-27 09:27:29.597825\n", |
384 | | - "4 2020-11-27 09:27:29.849458\n" |
| 371 | + "0 2020-12-11 18:28:04.960255\n", |
| 372 | + "1 2020-12-11 18:28:05.211221\n", |
| 373 | + "2 2020-12-11 18:28:05.461427\n", |
| 374 | + "3 2020-12-11 18:28:05.711582\n", |
| 375 | + "4 2020-12-11 18:28:05.962502\n" |
385 | 376 | ] |
386 | 377 | } |
387 | 378 | ], |
|
537 | 528 | "Converted 01_basics.ipynb.\n", |
538 | 529 | "Converted 02_foundation.ipynb.\n", |
539 | 530 | "Converted 03_xtras.ipynb.\n", |
540 | | - "Converted 03a.ipynb.\n", |
| 531 | + "Converted 03a_parallel.ipynb.\n", |
541 | 532 | "Converted 03b_net.ipynb.\n", |
542 | 533 | "Converted 04_dispatch.ipynb.\n", |
543 | 534 | "Converted 05_transform.ipynb.\n", |
|
0 commit comments