1. Python连接副本集
from pymongo import MongoClient
from bson.codec_options import CodecOptions
from retry import retry
import pytz
import pandas as pd
class MongoDbClient:
def __init__(self,...
1.1.线程同步lock和rlock
(1)lock
用锁会影响性能
用锁会产生死锁
import threading
from threading import lock
total = 0
lock = lock()
def add():
global total
global local
for i in range...