Le 13/09/2018 à 02:21, Neil Schemenauer a écrit :
On 2018-09-12, Neil Schemenauer wrote:
Personally, I think the correct way to do it is to pass ctx as the first parameter to all C-API functions. If it is not a global, I think you have to pass it. Other schemes are suboptimal and we should do the correct thing.
After talking to Dino a bit, I'm not sure about this now. It sounds like you could use thread-local storage rather than globals. That would be somewhat more limited but would still, in theory, allow what I was hoping for.
We already use thread-local storage for the PyGILState APIs. Nothing new here ;-)