I wonder if someone could provide a meaningful answer/pointer.
On 29.05.20 23:11, Andrew Pashkin wrote:
I want to implement my own version of _PyThread_CurrentFrames() <https://github.com/python/cpython/blob/e838a9324c1719bb917ca81ede8d766b5cb551f4/Python/pystate.c#L1161>, but it seems like it's not possible using public C-API. The comment <https://github.com/python/cpython/blob/e838a9324c1719bb917ca81ede8d766b5cb551f4/Python/pystate.c#L1176> in the source code of _PyThread_CurrentFrames() says that lists of interpreters and threads can be mutated even when GIL is held and so HEAD_LOCK() should be used. At the same time Advanced Debugger Support <https://docs.python.org/3/c-api/init.html#advanced-debugger-support> API exposes access to these lists but there is no way (or I don't see how) to achieve the same thing that HEAD_LOCK() does. Am I missing something or Advanced Debugger Support is incomplete? -- With kind regards, Andrew Pashkin. cell phone - +375 (44) 492-16-85 Skype - waves_in_fluids e-mail -andrew.pash...@gmx.co.uk
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/2H46ZUUKPYBBWGRZJF6IS4JJLQQ7FGBB/ Code of Conduct: http://python.org/psf/codeofconduct/