Overriding "__setattr__" of a module - possible?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Fri Jun 18 00:25:10 EDT 2010
En Thu, 17 Jun 2010 14:09:38 -0300, John Nagle <nagle at animats.com>
escribió:
> I'm trying out a proof of concept implementation for a new
> approach to safe threading. It's somewhat similar in concept
> to Alan Olsen's scheme. The basic difference is that once
> the program goes multi-thread, code objects and some other
> bindings are locked down and become unchangeable. Olsen
> was climbing the walls trying to get the locking right for
> the awful cases like redefining a function while another thread
> is inside it. I'm trying to lock out some of those cases.
> If you do that, removing the GIL requires less pain than
> Olsen experienced.
>
> The key idea is that the use cases for most of Python's
> code dynamism are during setup and initialization. You usually
> don't change code once the program has gone into its heavy
> parallel processing phase. This suggests a practical compromise.
Seems interesting...!
--
Gabriel Genellina
More information about the Python-list
mailing list