Does PyMongo update_one need locks?

24 views
Skip to first unread message

giorgos matheou

unread,
Sep 19, 2018, 8:59:02 AM9/19/18
to mongodb-user
Hello guys, 

I am using PyMongo 3.7. I have multiple threads writing/updating documents of a collection simultaneously, using the update_one function. Do I need to use locks to protect the function call?

Kind Regards,
GM

Bernie Hackett

unread,
Sep 19, 2018, 12:59:46 PM9/19/18
to mongodb-user
No. Concurrency for write operations is handled in the database.

giorgos matheou

unread,
Sep 22, 2018, 9:04:49 AM9/22/18
to mongodb-user
Thank you very much!

GM

Reply all
Reply to author
Forward
0 new messages