[SciPy-user] Multithreading cookbook entry

Anand Patil anand.prabhakar.patil@gmail....
Thu Feb 21 14:01:29 CST 2008


On Thu, Feb 21, 2008 at 11:52 AM, Lou Pecora <lou_boog2000@yahoo.com> wrote:
>
>  --- Anand Patil <anand.prabhakar.patil@gmail.com>
>  wrote:
>
>
>  > >  Yep. Oops. Fixed in the v2 versions of the files.
>  > The wiki doesn't
>  > >  make a very good version control system. Is it
>  > worth incorporating
>  > >  those files into scipy?
>  >
>  > I vote yes. In my opinion the following would
>  > combine to form a killer feature:
>  >
>  > - The handythread idea is developed a little, maybe
>  > to provide
>  > functionality comparable to OpenMP
>  > - Instructions for releasing the GIL in different
>  > extension types
>  > (swig, f2py, pyrex) are combined in one place
>  > - The numpy functions that release the GIL are
>  > clearly enumerated.
>
>  Yes, this is good, but I recognize that it's laying a
>  lot of work on someone with initials A.A.  I would be
>  happy to have the handythread.py along with simple
>  instructions of how to use Py_BEGIN_ALLOW_THREADS and
>  Py_BEGIN_ALLOW_THREADS in the C extension to make it
>  all work together ... Providing that can be done
>  easily with a few C calls.  Maybe it's more
>  complicated than I realize.  In which case:  OY !

I guess I was kind of thinking other people might jump in. :-) Surely
there are lots of us who want to multithread from Python?

I've already volunteered to look through the numpy functions and find
which ones release the GIL. I'd be happy to contribute to the
handythread-like library, too.

Anand


More information about the SciPy-user mailing list