This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nedds
Recipients collinwinter, nedds
Date 2008-07-25.21:06:35
SpamBayes Score 0.00017881997
Marked as misclassified No
Message-id <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a working, multiprocess version of 2to3 with a few caveats.
First, you need to already have the processing module installed for this
to work. If we don't want to include processing in some way, I think I
can modify this to only import processing and use the Process method if
the user wants to run it with more than one process. Also, I know that
logger is supposed to be thread safe, so I am correct in assuming that
this means it is also multi-process safe? This fix delegates the fixing
of files to a designated number of processes, so on a multi-core
machine, it is significantly faster. It may be appropriate to add a test
suite for it, but I have not yet done so. I've tested it on my dual-core
laptop running Ubuntu and a quad-core mac and it appears to be working
fine. I don't know if the use of tempfile was the right choice, but it
seemed reasonable. Another possibility is to instead using a processing
Queue and pass it the output, filename, and input rather than calling
write_file. Also, the join timeout I used is completely arbitrary
because I don't really have a sense of what a reasonable value for it
should be.
History
Date User Action Args
2008-07-25 21:06:39neddssetspambayes_score: 0.00017882 -> 0.00017881997
recipients: + nedds, collinwinter
2008-07-25 21:06:38neddssetspambayes_score: 0.00017882 -> 0.00017882
messageid: <1217019998.69.0.231122552254.issue3448@psf.upfronthosting.co.za>
2008-07-25 21:06:37neddslinkissue3448 messages
2008-07-25 21:06:36neddscreate