4 ms·
It is probably a bad practice to not acquire a mutex for that concurrent dictionary update. The code should be improved in that regard, with or without any pote
by zelphirkalt 5y ago
It is probably a bad practice to not acquire a mutex for that concurrent dictionary update. The code should be improved in that regard, with or without any potential Python language change.
- lvass 5y agoIf needed, I'll probably just change it to asyncio, probably saner than inspecting everything for new parallelism bugs which can be incredibly subtle.
- ajkjk 5y agoIf performance isn't hugely important you could make blanket-locking wrappers around common data structures and swap them in-place for all of your global state. .. but, as I said, removing the GIL will almost certainly be opt-in.