[Python-3000] PEP 3121 implemented

"Martin v. Löwis" martin at v.loewis.de
Thu Jun 12 09:06:30 CEST 2008


> I saw a talk today in which the presenter was talking about "guaranteed
> transfer of ownership" enforced by the language runtime. Essentially, it
> was a technique to allow a data structure to be passed from one thread
> to another, with a guarantee that there would be no heap pointers under
> control of the old thread pointing to anywhere in the data structure.
> When ownership is transferred, the old thread loses all visibility
> within the data structure, and the new thread now gains visibility of
> the structure. This was used to implement a non-copying message passing
> framework.

In the same spirit, .NET "smuggles" objects across app-domains, if
it can determine that sharing the objects is safe. It does so only for
string objects, though, IIRC (which are safe to smuggle because they
are immutable). The in-memory remoting channel then transfers a single
byte array (the marshalled data), plus an object array of smuggled
objects.

Regards,
Martin




More information about the Python-3000 mailing list