Message165281
We make almost no guarantees about atomicity. If something in CPython happens to be atomic, it is not guaranteed to hold in other implementations. The recommendation is to use locks anywhere you need a critical section of code.
FWIW, the term thread-safe is taken to mean, "won't break in a multi-threaded environment". That is a bit different from atomic. For example, the decimal module was designed with thread local contexts, but there are no atomic decimal operations. |
|
Date |
User |
Action |
Args |
2012-07-12 05:47:01 | rhettinger | set | recipients:
+ rhettinger, chris.jerdonek |
2012-07-12 05:47:01 | rhettinger | set | messageid: <1342072021.2.0.258514779346.issue15330@psf.upfronthosting.co.za> |
2012-07-12 05:47:00 | rhettinger | link | issue15330 messages |
2012-07-12 05:47:00 | rhettinger | create | |
|