On Jul 10, 2014, at 10:17 PM, Warren Young
On Jul 10, 2014, at 8:32 PM, Damien Kick
I don't know what that means "bind of Connection objects to individual threads”.
It means that at the top of each thread worker, create the connection in that thread, and
never use the connection outside that thread, nor pass any MySQL++ objects it creates
outside that thread. You can pass copies of the *data* you get from the DB outside the
Yes, if I use a Connection per thread, then I avoid any threading issues associated with
sharing a Connection between threads.
"The simple fix is to just create a separarate Connection object for each thread that
needs to make database queries."
But I was under the impression that sharing a Connection object between threads should be
"If your program’s connection-management strategy allows a thread to use a
Connection object that another thread created, you need to know
aboutConnection::thread_start(). This function sets up per-thread resources needed to
make MySQL server calls." [ibid]
(Assume I know nothing […])
Fair enough. Anybody else?
This e-mail and any attachments are confidential. If it is not intended for you, please
notify the sender, and please erase and ignore the contents.