【问题标题】:How does gevent interact with threading.local data?gevent 如何与 threading.local 数据交互?
【发布时间】:2013-03-12 05:09:50
【问题描述】:

存储在 threading.local 中的数据对于特定的协程是唯一的,还是对于 python 线程仍然是唯一的?

【问题讨论】:

    标签: gevent


    【解决方案1】:

    根据http://www.gevent.org/gevent.monkey.html 的gevent.monkey 文档,线程和线程模块变成了基于greenlet 的。 “线程本地存储变成greenlet本地存储。”

    【讨论】:

    • - 如果你用猴子修补过它。
    • @Ivo :) 我认为这是不言而喻的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-04-10
    • 2014-02-05
    • 2015-03-29
    • 1970-01-01
    • 2011-02-20
    • 2020-06-25
    • 1970-01-01
    相关资源
    最近更新 更多