Add custom initializer argument to multiprocess.Manager*, courtesy of lekma

This commit is contained in:
Jesse Noller 2009-04-02 05:17:26 +00:00
parent d56bab47f1
commit 7152f6d915
5 changed files with 50 additions and 6 deletions

View file

@ -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(