[issue30808] Use _Py_atomic API for concurrency-sensitive signal state

STINNER Victor report at bugs.python.org
Thu Jun 29 16:22:45 EDT 2017


STINNER Victor added the comment:

There is a sig_atomic_t type. Should we use that one?
https://www.gnu.org/software/libc/manual/html_node/Atomic-Types.html

"To avoid uncertainty about interrupting access to a variable, you can use a particular data type for which access is always atomic: sig_atomic_t. Reading and writing this data type is guaranteed to happen in a single instruction, so there’s no way for a handler to run “in the middle” of an access."

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30808>
_______________________________________


More information about the Python-bugs-list mailing list