[Python-Dev] Feature Request: Py_NewInterpreter to create separate GIL (branch) (original) (raw)
James Y Knight foom at fuhm.net
Mon Nov 6 04:08:42 CET 2006
- Previous message: [Python-Dev] Feature Request: Py_NewInterpreter to create separate GIL (branch)
- Next message: [Python-Dev] Feature Request: Py_NewInterpreter to create separate GIL (branch)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Nov 4, 2006, at 3:49 AM, Martin v. Löwis wrote:
Notice that at least the following objects are shared between interpreters, as they are singletons: - None, True, False, (), "", u"" - strings of length 1, Unicode strings of length 1 with ord < 256 - integers between -5 and 256 How do you deal with the reference counters of these objects?
Also, type objects (in particular exception types) are shared between interpreters. These are mutable objects, so you have actually dictionaries shared between interpreters. How would you deal with these?
All these should be dealt with by making them per-interpreter
singletons, not per address space. That should be simple enough,
unfortunately the margins of this email are too small to describe
how. ;) Also it'd be backwards incompatible with current extension
modules.
James
- Previous message: [Python-Dev] Feature Request: Py_NewInterpreter to create separate GIL (branch)
- Next message: [Python-Dev] Feature Request: Py_NewInterpreter to create separate GIL (branch)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]