pyobjc icon indicating copy to clipboard operation
pyobjc copied to clipboard

Design interfaces needed for multiple sub interpreters using PyObjC

Open ronaldoussoren opened this issue 2 years ago • 1 comments
trafficstars

When having multiple sub interpreters that use PyObjC sub interpreter A could see Python objects that are created in sub interpreter B. Design a way to deal with this:

  • Converting from ObjC to Python should check the owning sub interpreter for the various OC_Python* classes and create a generic proxy when the owner doesn't match the current thread
  • Should have proxy registries per sub interpreter, not globally
  • ...

ronaldoussoren avatar Feb 11 '23 10:02 ronaldoussoren

Ideally this would also have an API that embedders can use (see for example #460). It should be fairly easy to add an ObjC class with a documented interface using class methods that can be used for this. That should isolate embedders from the technical details of this, allowing further evolution of the implementation.

Including documentation and tests of course...

ronaldoussoren avatar Mar 25 '23 17:03 ronaldoussoren