[CXX-303] mongo::client::initialize() behaviour is unclear Created: 11/Aug/14  Updated: 23/Oct/14  Resolved: 11/Sep/14

Status: Closed
Project: C++ Driver
Component/s: Documentation
Affects Version/s: legacy-1.0.0-rc0
Fix Version/s: legacy-1.0.0-rc1

Type: Improvement Priority: Major - P3
Reporter: Gerry F Assignee: Samantha Ritter (Inactive)
Resolution: Done Votes: 0
Labels: legacy-cxx
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CXX-283 MongoDB exception 17234 Closed

 Description   

The documentation for mongo::client::initialize() and terminate()/shutdown() is not very clear on how and when to use these functions. Testing shows that initialize() must be called on the Windows platform in order to connect to a database server.

Based on hints in CXX-283, it appears that initialize() should be called just once per process.

In the event that someone creates a MongoDB driver using the legacy API and therefore does not control the process that the driver is loaded into, how would this be used? If the driver is stopped ( for example, on Windows the driver dll is unloaded), will shutdown() stop any stray threads created by initialize()?



 Comments   
Comment by Githook User [ 11/Sep/14 ]

Author:

{u'username': u'samantharitter', u'name': u'Samantha Ritter', u'email': u'samantha.ritter@10gen.com'}

Message: CXX-303 Clarify initialize() and shutdown() behavior
Branch: legacy
https://github.com/mongodb/mongo-cxx-driver/commit/1b4e860108cd06e3889ceff5189bd3d5788d3a49

Comment by Samantha Ritter (Inactive) [ 10/Sep/14 ]

https://github.com/mongodb/mongo-cxx-driver/pull/142

Generated at Wed Feb 07 21:58:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.