Skip to content

Conversation

@MeanSquaredError
Copy link
Contributor

@MeanSquaredError MeanSquaredError commented Sep 30, 2023

This PR adds:

  • A documentation file for connection pools docs/Connection-Pools.md
  • The documentation on threads is slightly expanded.
  • A basic example which shows how to workaround the multithreading issues using connection pools. The sample program creates a thread_local wrapper for a connection handle. The thread_local wrapper exposes all relevant connection methods, in this example it exposes just operator(). The wrapper lazily fetches a connection from the pool the first time when operator() is called. Then the example runs 10 thread, each thread running 5 SQL queries in a loop.

Copy link
Owner

@rbock rbock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the documentation and example!

@rbock
Copy link
Owner

rbock commented Oct 3, 2023

Thanks for documenting and providing examples! Nice work!

@rbock rbock merged commit 7f04435 into rbock:main Oct 3, 2023
@MeanSquaredError MeanSquaredError deleted the conn_pool_doc branch October 9, 2023 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants