mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Add custom initializer argument to multiprocess.Manager*, courtesy of lekma
This commit is contained in:
parent
d56bab47f1
commit
7152f6d915
5 changed files with 50 additions and 6 deletions
|
@ -92,6 +92,9 @@ class Pool(object):
|
|||
except NotImplementedError:
|
||||
processes = 1
|
||||
|
||||
if initializer is not None and not hasattr(initializer, '__call__'):
|
||||
raise TypeError('initializer must be a callable')
|
||||
|
||||
self._pool = []
|
||||
for i in range(processes):
|
||||
w = self.Process(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue