questions about multiprocessing

Benjamin Kaplan benjamin.kaplan at case.edu
Mon Mar 7 21:38:05 EST 2011


On Mon, Mar 7, 2011 at 7:47 PM, Vincent Ren <renws1990 at gmail.com> wrote:
> Got it, thanks.
> But what should I do if I want to improve the efficiency of my
> program?
>

Is there any particular reason you're using processes and not threads?
Functions that wait for stuff to happen in C land, such as I/O calls,
release the GIL so threads can be run in parallel. It's only stuff
that happens in Python land (i.e. manipulating Python objects) that
can't be run concurrently.



More information about the Python-list mailing list