Hello, I'm trying to replicate the behavior you can get in CPython with the following code:
ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), ctypes.py_object(KeyboardInterrupt)) This schedules an exception to be raised on the target thread. I saw one reference indicating that the CPython interpreter implements this by polling for exceptions to raise every hundred opcodes or so, but I didn't look into it and don't know for sure that's correct. It does seem correct, though, based just on my intuition of how a runtime would need to handle asynchronous signals. Is there any equivalent functionality in pypy? If not, is there anything fundamentally preventing pypy from gaining something like this? If not, is there anything I can do to help it be built? Thanks, - Audrey -- Audrey Dutcher she/her/hers https://rhelmot.io/ _______________________________________________ pypy-dev mailing list -- pypy-dev@python.org To unsubscribe send an email to pypy-dev-le...@python.org https://mail.python.org/mailman3/lists/pypy-dev.python.org/ Member address: arch...@mail-archive.com