[pypy-dev] some questions

Aurélien Campéas aurelien.campeas at logilab.fr
Tue Dec 19 18:50:46 CET 2006

Dear pypyers,

I've resumed work on WP9, with the intent to finish it ASAP. Right now
I face a little difficulty. I'd like to have your input (essentially
Armin's input I guess) on this.

Back when I was thinking about the requirements of WP9, esp. the
non-deterministic aspects, I thought clonable coroutines/threads would
do, fuzzily. Yet obviously these features have been provided and could
still be used to achieve my goals, but that is not what I have decided
to do since then...

What I'd like to know if I have painted myself in a corner with the
current design of the logic objectspace. Right now, a computation
space is defined as a set of concurrent activities (thread group); in
the case of constraint solving, there is one 'main' thread doing the
choices, and an army of propagator threads trying to empty the
domains. The idea is to associate a garbage collector pool to such a
set. I wrote the pool handling code and the clone stuff following as
closely as possible what's in modules/_stackless/interp_clonable and
friends (most recent versions I think); without a clear understanding
of how it works ... (see in objspace/cclp/types.py the Pool class,
some client code in space.py and scheduler.py)

Then, what happens now is that the cloning routine returns the
original thread group.

My question is the following :

* is there a chance that a peer review and eventual correction/advice
on that non-working code can yield a working solution in a reasonnable
amount of time ? or 

* is it time for me to simplify considerably the computation space
down to one single thread, so as to directly peruse the (working)
coroutine cloning facility ?

The later option would entail throwing away ten days of work, and
spending a more days to reorganize and rewrite stuff, but can be done
while retaining a reasonnable amount of functionnality.

(Well, in truth I expect a quick code review by Armin to expose some
blunders of mine... Just don't hit too hard my poor head.)


More information about the Pypy-dev mailing list