pymongo monitor thread

Note
Instances of MongoReplicaSetClient
start a background task to monitor the state of the replica set. This allows it to quickly respond to changes in replica set configuration. Before discarding an instance of MongoReplicaSetClient
make sure you call close()
to ensure that the monitor task is cleanly shut down.

PyMongo implements a PeriodicExecutor
for two purposes: as the background thread for Monitor
, and to regularly check if there are OP_KILL_CURSORS
messages that must be sent to the server.

http://api.mongodb.org/python/current/developer/periodic_executor.html

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 00后疯狂肆虐 曾经的90后开始变老的时候 我们迷茫尴尬 受不了过去的哥哥早已变成了叔叔 身体里模糊存活着一个带着...
    若向风阅读 192评论 0 0
  • 熬夜到一点,睡意朦胧,林丹还在写笔记。 昨天大家和廖老师一起吃饭,聊大家的选择,大家的准备。而我,只是觉得五味杂陈...
    豆四吧阅读 266评论 0 3
  • 春天最让人厌烦的便是梅雨罢 几乎下不完 让人绝望的想扒开青天 但凡有点力气 都会被这鬼天气折腾光了 很多人在等待晴...