Message165281
| Author |
rhettinger |
| Recipients |
chris.jerdonek, rhettinger |
| Date |
2012年07月12日.05:47:00 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1342072021.2.0.258514779346.issue15330@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|