multithreading - Can signals be caught and handled in python in-between reference counting operations? -


obviously gil prevents switching contexts between threads protect reference counting, signal handling safe in cpython?

signals in python caught simple signal handler which, in effect, schedules actual signal handler function called on main thread. c signal handler doesn't touch python objects, doesn't risk corrupting state, while python signal handler executed in-between bytecode op evaluations, won't corrupt cpython's internal state.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -