[CXX-1532] Demonstrate "pool" in thread-safety.md Created: 21/Mar/18  Updated: 28/Oct/23  Resolved: 03/Jul/18

Status: Closed
Project: C++ Driver
Component/s: Documentation
Affects Version/s: None
Fix Version/s: 3.5.0

Type: Improvement Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Spencer Mckenney
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In thread-safety.md the final section, "The best version," isn't really the best example of multi-threaded code using the driver. The example creates two distinct clients for two threads. Instead, we should demonstrate the use of mongocxx::pool.



 Comments   
Comment by Githook User [ 03/Jul/18 ]

Author:

{'username': 'spencemc', 'name': 'Spencer McKenney', 'email': 'spencermck@me.com'}

Message: CXX-1532 use pool in thread safety example
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/656adb345d287e1ee57c88caf5737ee47564f532

Comment by Kevin Albertson [ 06/May/18 ]

I would also consider keeping that example as a "Don't do this" example. Each individual client will have it's own topology and topology scanner in that case, doing twice the work.

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