Message294453
> Isn't list(dict) atomic? At least in CPython.
I doubt it. There's no special code for list(dict), it uses regular iteration which could probably hit the GC and then release the GIL.
> I suspect that protecting *all* accesses to _data with a lock will hit the performance and invalidate the reason of using _data for caching.
I'm not convinced os.environ is performance-critical. Perhaps getenv() is really expensive on some systems? |
|
Date |
User |
Action |
Args |
2017-05-25 10:13:54 | pitrou | set | recipients:
+ pitrou, mark.dickinson, martin.panter, serhiy.storchaka, osantana, JelleZijlstra, Danilo Shiga |
2017-05-25 10:13:54 | pitrou | set | messageid: <1495707234.79.0.292099278273.issue30441@psf.upfronthosting.co.za> |
2017-05-25 10:13:54 | pitrou | link | issue30441 messages |
2017-05-25 10:13:54 | pitrou | create | |
|