On Mon, 2 Oct 2017 21:31:30 -0400 Eric Snow <ericsnowcurren...@gmail.com> wrote: > > > By contrast, if we allow an actual bytes object to be shared, then > > either every INCREF or DECREF on that bytes object becomes a > > synchronisation point, or else we end up needing some kind of > > secondary per-interpreter refcount where the interpreter doesn't drop > > its shared reference to the original object in its source interpreter > > until the internal refcount in the borrowing interpreter drops to > > zero. > > There shouldn't be a need to synchronize on INCREF. If both > interpreters have at least 1 reference then either one adding a > reference shouldn't be a problem.
I'm not sure what Nick meant by "synchronization point", but at least you certainly need INCREF and DECREF to be atomic, which is a departure from today's Py_INCREF / Py_DECREF behaviour (and is significantly slower, even on high-level benchmarks). Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com