Message177955
| Author |
serhiy.storchaka |
| Recipients |
amaury.forgeotdarc, anacrolix, asvetlov, eric.snow, ezio.melotti, giampaolo.rodola, kachayev, meador.inge, pitrou, rhettinger, serhiy.storchaka |
| Date |
2012年12月22日.21:00:59 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1356210060.73.0.913726011151.issue14373@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Antoine reminded me about a lock. In Python implementation it needed because linked list modifications are not atomic. In C implementation linked list modifications are atomic. However dict operations can call Python code and therefore they are not atomic. I don't know what bad things can happened with concurrent cache updating, however using lock will be safer and cheap enought.
Please add lock field to lru_cache_object and use it as in Python implementation. If no one can prove that a lock is not needed. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年12月22日 21:01:01 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, amaury.forgeotdarc, pitrou, giampaolo.rodola, ezio.melotti, asvetlov, meador.inge, anacrolix, eric.snow, kachayev |
| 2012年12月22日 21:01:00 | serhiy.storchaka | set | messageid: <1356210060.73.0.913726011151.issue14373@psf.upfronthosting.co.za> |
| 2012年12月22日 21:01:00 | serhiy.storchaka | link | issue14373 messages |
| 2012年12月22日 21:00:59 | serhiy.storchaka | create |
|