Embedding Python, threading and scalability

Donn Cave donn at drizzle.com
Thu Jul 10 23:42:18 EDT 2003


Quoth "Simon Wittber (Maptek)" <Simon.Wittber at perth.maptek.com.au>:
| [snip]
| >...the way to scale Python in a threaded environment is to call out to
| a C >extension that releases the GIL.
| [snip]
|
| To write scalable applications in Python, one must write the
| 'scalabilty-required' parts n C.
|
| Does anyone else see this as a problem?

Is it a problem?

I don't know all the reasons why an application might want to
compute in parallel on multiple CPUs, but I am guessing that
ordinarily it's about processor intensive computations.  That
isn't really Python's strongest point - you want to write the
heavy duty computing in C if you want speed.

If it's any consolation, I believe the ocaml Objective CAML
thread implementation has the same kind of global lock, even
though it does compile to efficient native code and would
otherwise be an attractive candidate for compute intensive
applications.  Don't take my word for it, but that's how it
looks to me.  Regardless of how grave the problem may be,
if there's no practical fix, we live with it.

	Donn Cave, donn at drizzle.com




More information about the Python-list mailing list