[pypy-dev] Grand Central like multiprocessing?

Henry Mason thefridgeowl at gmail.com
Tue Sep 15 16:33:21 CEST 2009

Hm, what part of GCD would you use? You can effectively use  
libdispatch inside of Python already by wrapping the dispatch_* APIs  
in ctypes and then using ctypes' callback function mechanism to pass  
Python functions onto dispatch queues. This would get even better if  
ctypes had first class support for Blocks. (hey that's a good idea...)

The problem is that libdispatch doesn't get you around the global  
interpreter lock, so your Python code would still only run on one  
thread at a time. But yeah, once the GIL is gone, I imagine  
libdispatch (and/or some kind of nice pythonic wrapper for it) would  
be pretty cool.


On Sep 15, 2009, at 4:43 AM, Florian Schulze wrote:

> Hi!
> I wondered whether it would make sense to have multiprocessing  
> implemented
> the way Grand Central from Apple is done. With the 'with' statement  
> this
> could be very nicely supported in Python and would make it very easy  
> to
> use. If PyPy supported something like this and could take advantage  
> of the
> OS level on OS X 10.6 and maybe future implementations of similar
> technology on other OSes then Python could get another boost, for  
> example
> in the scientific and super computing communities.
> Thoughts?
> Regards,
> Florian Schulze
> _______________________________________________
> pypy-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/pypy-dev

More information about the Pypy-dev mailing list