[Python-Dev] Cloning threading.py using proccesses
r.m.oudkerk at googlemail.com
Wed Oct 11 17:20:44 CEST 2006
On 10/10/06, Josiah Carlson <jcarlson at uci.edu> wrote:
> > the really interesting thing here is a ready-made threading-style API, I
> > think. reimplementing queues, locks, and semaphores can be a reasonable
> > amount of work; might as well use an existing implementation.
> Really, it is a matter of asking what kind of API is desireable. Do we
> want to have threading plus other stuff be the style of API that we want
> to replicate? Do we want to have shared queue objects, or would an
> XML-RPC-esque remote.queue_put('queue_X', value) and
> remote.queue_get('queue_X', blocking=1) be better?
Whatever the API is, I think it is useful if you can swap between
threads and processes just by changing the import line. That way you
can write applications without deciding upfront which to use.
More information about the Python-Dev