About threads in python

Dan Stromberg drsalists at gmail.com
Thu Apr 21 21:05:56 EDT 2011


On Thu, Apr 21, 2011 at 6:19 AM, dutche <dutche at gmail.com> wrote:

> Hi folks, how are ya?
>
> Here's the thing...I had to make a program with threads and after
> finished, I found some posts and articles in Google about Python and
> threads, raising the question about if it really implements thread
> programming or not, because of GIL and the way Python needs to lock
> some objects.
>

http://wiki.python.org/moin/Concurrency

Either all or nearly all Python implementations have threading, but for some
implementations and some workloads, multithreading is not as effective as
multiprocessing.

Don't try to program in Python as though it's whatever other language you're
coming from.  It's better to learn each language's own strengths and
weaknesses, and work with them rather than against them.

EG: You shouldn't do list processing in FORTRAN, even if you were once a
Lisp programmer.  There are equivalent ways of achieving the same goals in
FORTRAN, if you're willing to give up your Lisp influence though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110421/a97cf7e5/attachment.html>


More information about the Python-list mailing list