dcramer/mangodb — pull request #25 by jkreps (2012-06-28 20:40:07+00:00)
Title: Optimize concurrent access

We had a production issue with Mango, that lead us to find this fairly subtle corner case. It is possible for two users to come to our site *at the same time* resulting in multiple concurrent requests to Mango. This leads to performance problems due to context switching. Python tries to optimize this (see, e.g., http://www.dabeaz.com/python/UnderstandingGIL.pdf ), but in a distributed system I don't think we can assume that all nodes are implemented in python. This patch fixes the problem.