Python manager.dict() is very slow compared to regular dict

前端 未结 2 913
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-14 09:29

I have a dict to store objects:

jobs = {}
job = Job()
jobs[job.name] = job

now I want to convert it to use manager dict because I want to use m

2条回答
  •  一生所求
    2021-02-14 10:07

    If you are using mgr.dict() inside a loop in your pool. You can use a local normal dict to store results temporarily and then update your mgr.dict() outside the loop like your_mgr_dict.update(local_dict)

提交回复
热议问题