start function in new process

Martin P. Hellwig martin.hellwig at dcuktec.org
Fri Mar 5 15:02:34 EST 2010


On 03/05/10 19:45, wongjoekmeu at yahoo.com wrote:
> On 5 mrt, 20:40, "Martin P. Hellwig"<martin.hell... at dcuktec.org>
> wrote:
>> On 03/05/10 19:21, wongjoek... at yahoo.com wrote:
>> <cut os.fork problem>
>> Any specific reason why threading.Thread or multiprocessing is not
>> suitable to solve your problem?
>>
>> --
>> mph
>
> Because I got a memory leak in my function f(). It uses scipy, numpy,
> pylab, and I am not planning to solve the memory leak because its too
> complicated. So I thought of just calling the function then when it is
> finished the process is gone and all memory is released. With
> threading I don't think I would solve this problem. I am not sure
> though.

I would be surprised if you can't do the same with 
subprocess/multiprocessing, since you seem to know how to identify the 
memory leak it shouldn't be a problem scripting out a test to see if it 
works this way. I would be interested though in your findings.

-- 
mph



More information about the Python-list mailing list