[Python-ideas] Fwd: Concurrent safety?

Jim Jewett jimjjewett at gmail.com
Fri Nov 4 15:38:29 CET 2011


On Fri, Nov 4, 2011 at 5:36 AM, Stephen J. Turnbull <stephen at xemacs.org> wrote:
> Jim Jewett writes:
>  > On Thu, Nov 3, 2011 at 12:35 AM, Stephen J. Turnbull <stephen at xemacs.org> wrote:

>  > > As for "wrapped C libraries", I'm having trouble imagining what you're
>  > > talking about.

>  > C code (currently) can create or modify python objects using a C
>  > pointer, instead of python access.

> Right, and that means they complete bypass Mike's proposal, too.  So
> his reference to them was a non sequitur in context, because AFAICS
> his proposal couldn't do anything more about them than mine could.

> Can it?

Not if it is just an additional compile-time restriction.

If the implementation is prepared to enforce the restriction at
run-time, that will almost certainly require some changes to memory
allocation.  If done right, that might also be able to lock out rogue
C code, which should also allow a tracing GC, stronger security
guarantees, and GIL removal.

I don't personally see it happening without a currently unacceptable
slowdown for all memory access, but if he is looking 5-10 years out,
it is plausible.  (I would still bet against it for mainstream
CPython, but it is plausible.)

-jJ



More information about the Python-ideas mailing list