Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47037d7

Browse files
committed
Merge: fix typo in multiprocessing documentation, thanks to Dmitry Tolstoy from docs@
2 parents e5b45cc + 23089ab commit 47037d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/multiprocessing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ For example::
279279
return x*x
280280

281281
if __name__ == '__main__':
282-
with Pool(processes=4) as pool # start 4 worker processes
282+
with Pool(processes=4) as pool: # start 4 worker processes
283283
result = pool.apply_async(f, [10]) # evaluate "f(10)" asynchronously
284284
print(result.get(timeout=1)) # prints "100" unless your computer is *very* slow
285285
print(pool.map(f, range(10))) # prints "[0, 1, 4,..., 81]"

0 commit comments

Comments
 (0)