PYTHON-1634Ready for Work
Provide a way to join background threads when closing a MongoClient
MongoClient.close() closes its sockets and signals its background threads to exit but it does not actually wait for the threads to exit (via join). This is problematic when using a MongoClient from a subinterpreter. Even when closing the MongoClient, an error gets raised when closing the subinterpreter: {{Py_EndInterpreter: not the last thread}} Reported in: https://groups.google.com/d/msg/mongodb-user/vgsE6MpcyGE/1xm-WXMrAAAJ and: https://groups.google.com/forum/#!topic/jep-project/lAv7-HVA