MySQL Forums
Forum List  »  Connector/C++

Error in my_thread_global_end(): 7 threads didn't exit
Posted by: Constantin Cristian
Date: September 04, 2009 03:49AM

Hi,

I'm using the Red Hat Enterprise Linux 5 (non RPM package) C++ connector to connect to a database in a separate thread created with pthread_create:

void* CDatabaseConnector::WorkerThread(void* arg)
{
CDatabaseConnector * me = static_cast<CDatabaseConnector*>(arg);
long long status = 0;
//pthread_mutex_lock(&(me->_WorkerThread_mutex));
LOG(CLogger::Debug, "CDatabaseConnector" );
try {
sql::Driver * driver = get_driver_instance();
/* Using the Driver to create a connection */
std::auto_ptr< sql::Connection > con(driver->connect(me->_sql_settings.host, me->_sql_settings.user, me->_sql_settings.password));
................

Everything works great but when I close my application I get the dreaded :
Error in my_thread_global_end(): 7 threads didn't exit

What I figured out is that the number represents the number of times I opened a mysql connection with driver->connect().
I'm not sure what should I do. The application I am writing is meant to be highly reliable and is meant to be running for days or even months without stopping, so probably I can't ignore this issue.

There seems to be no issue with Windows and Mandriva Linux, I guess its something wrong with RedHat binaries.

Regards,
Constantin Cristian

Options: ReplyQuote


Subject
Views
Written By
Posted
Error in my_thread_global_end(): 7 threads didn't exit
7267
September 04, 2009 03:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.