ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> scipy-user
scipy-user
Re: [SciPy-user] dual core scipy in windows (signal.lsim2)
by A. M. Archibald other posts by this author
Nov 25 2006 3:36PM messages near this date
Re: [SciPy-user] dual core scipy in windows (signal.lsim2) | Re: [SciPy-user] Installing scipy on x86_64 opensuse 10.1 system
On 25/11/06, Gael Varoquaux <gael.varoquaux@[...].org>  wrote:
>  This is due to ain intrinsic limitation of python (the way it is
>  currently programmed). The python interpretor is not a multithreaded
>  program. Two python instruction cannot execute in the same time. This is
>  garantied by something known as the "global interpretor lock". C code
>  called by python can release the GIL and let the python interpretor run
>  other threads in parallel, but when the c call finishes the GIL rules
>  again. Workaround involve using different instances of the python
>  interpretor and doing some message passing between. The next version of
>  ipython will use this technic, but it is clearly not part of normal
>  python's feature.

Speaking from experience, the global interpreter lock need not be an
obstacle to using python's threads to parallelize CPU-intensive code,
particularly numeric code. It is perfectly possible to get two threads
churning away using all the CPU time on both of two processors without
any special tricks. Only certain applications are affected by the
global interpreter lock.

A. M. Archibald
_______________________________________________
SciPy-user mailing list
SciPy-user@[...].org
http://projects.scipy.org/mailman/listinfo/scipy-user
Thread:
Ryan Krauss
A. M. Archibald
Robert
Gael Varoquaux
A. M. Archibald

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved