On Fri, Sep 16, 2011 at 4:54 AM, Terry Reedy <tjre...@udel.edu> wrote:
> On 9/15/2011 1:19 AM, pyt...@bdurham.com wrote:
>> I was thinking there might be a technique I could use to evaluate
>> regular expressions in a thread or another process launched via
>> multiprocessing module and then kill the thread/process after a
>> specified timeout period.
>
> Only solution I remember ever seen posted.

Then here's a minor refinement. Since long-running RE is the
exceptional case, optimize for the other. Keep the process around and
feed it all the jobs you get, and on problem, kill and respawn. That
way, you pay most of the overhead cost only when you make use of the
separation. (There's still some IPC overhead of course. Can't escape
that.)

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to