Jesse Noller wrote:

> http://www.kamaelia.org/Home

Thanks for the mention :)

I don't think it's a good fit for the original poster's question, but a
solution to the original poster's question would be generally useful IMO,
_especially_ on python implementations without a GIL (where threads are the
more natural approach to using multiple processes & multiple processors).

The approach I think would be useful would perhaps by allowing python to
have some concept of "green processes" - that is threads that can only see
thread local values or they search/update thread local space before
checking globals, ie flipping

   X = threading.local()
   X.foo = "bar"

To something like:
   X = greenprocesses.shared()
   X.foo = "bar"

Or even just changing the search for values from:
   * Search local context
   * Search global context

To:
   * Search thread local context
   * Search local context
   * Search global context

Would probably be quite handy, and eliminate whole classes of bugs for
people using threads. (Probably introduce all sorts of new ones of course,
but perhaps easier to isolate ones)

However, I suspect this is also *a lot* easier to say than to implement :-)

(that said, I did hack on the python internals once (cf pep 318) so it might
be quite pleasant to try)

It's also independent of any discussions regarding the GIL of course since
it would just make life generally safer for people.

BTW, regarding Kamaelia - regarding something you said on your blog - whilst
the components list on /Components looks like a large amount of extra stuff
you have to comprehend to use, you don't. (The interdependency between
components is actually very low.)

The core that someone needs to understand is the contents of this:
    http://www.kamaelia.org/MiniAxon/

Which is sufficient to get someone started. (based on testing with a couple
of dozen novice developers now :)

If someone doesn't want to rewrite their app to be kamaelia based, they can
cherry pick stuff, by running kamaelia's scheduler in the background and
using components in a file-handle like fashion:
    * http://www.kamaelia.org/AxonHandle

The reason /Components contains all those things isn't because we're trying
to make it into a swiss army knife, it's because it's been useful in
domains that have generated those components which are generally
reusable :-)



Michael.
--
http://www.kamaelia.org/GetKamaelia

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to