On Jul 11, 2014, at 10:54 AM, Damien Kick <dkick@stripped> wrote:
> Yes, if I use a Connection per thread, then I avoid any threading issues associated
> with sharing a Connection between threads.
This is an open-source project. I regularly accept outside patches. If you think the
library should allow arbitrary sharing of Connection objects among threads, jump into the
library and figure out why it is not currently possible, and provide a patch.
Until then, “So don’t do that, then” is a perfectly reasonable answer.
> But I was under the impression that sharing a Connection object between threads
> should be okay.
Only in strictly limited ways.
The underlying MySQL C API library will not allow two simultaneous queries on a single
connection — lowercase “C”. Thus, if you have no way to mediate access
to the Connection object — such as a ConnectionPool — you’re likely to
run into trouble.
> (Assume I know nothing […])
> Fair enough. Anybody else?
Are you aware that you’re corresponding with the person who has been maintaining
MySQL++ for the past decade?
Not only do I know more about how MySQL++ works than probably anyone else on the planet,
I’m also in the best position to help you. You may have noticed that you have not
yet been inundated with other offers of help.
So…how about you can the snark?