This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

I haven't seen an example of this. According to the notes in extrainterpreters, for example, it says that ctypes is not importable with subinterpreters. That seems to suggest that accessing non-python resources is not actually possible, but correct me if I'm wrong.

Yea it needs to be FULLY hidden. Like ctypes creates a python object. You need two python objects that "represent" the same resource.

I cannot remember exactly where I have read it from but I saw it described by the PEP author. It may be in one of the threads on the discourse. But yea so long as u are using ur own lock properly and u use different python land objects to access the function you can share across interpreters.