[issue3448] Multi-process 2to3
Amaury Forgeot d'Arc
report at bugs.python.org
Tue Oct 7 13:38:44 CEST 2008
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
I suggest that when using lib2to3 as a library, multiprocessing is not
enabled by default; there may be uses of the library that are
incompatible with multiprocessing.
It may be enabled by default when using it from the command line (or the
lib2to3.main module). But which default number of processes would this use?
Concerning the patch itself:
- the line "from processing import Process" seems suspect.
- Did you consider using something as simple as:
pool = multiprocessing.Pool(self.options.num_processes)
pool.map(self.refactor_file, fullnames)
It should do all the job: start processes, queue tasks, wait for results.
----------
nosy: +amaury.forgeotdarc
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3448>
_______________________________________
More information about the Python-bugs-list
mailing list