Why reversed() removes thread safety?

前端 未结 0 1698
说谎
说谎 2021-02-02 11:09

A common idiom in CPython to ensure thread safety for iteration is using tuple().

For example - tuple(dict.items()) is guaranteed to be threadsa

相关标签:
回答
  • 消灭零回复
提交回复
热议问题