0

I have a problem with the design of mysql client library.

MySQL requires that each thread that uses the MySQL API first call mysql_thread_init() and at the end call mysql_thread_end(). If the thread fails to call mysql_thread_end(), then MySQL will block the main thread at program termination and wait for this threads to call mysql_thread_end(). If that doesn't happen, then it prints an error message to STDERR. Not a very user-friendly behavior.

now the problem is that i m inside an ISAPI dll, it's not me who create the thread (nor destructing it), it's IIS that manage it.

How can i be warned then the thread will end to call mysql_thread_end ?

Ananta Prasad
  • 3,655
  • 3
  • 23
  • 35
zeus
  • 12,173
  • 9
  • 63
  • 184
  • I believe if you are the one who called the init then you are the one responsible for calling end too. Does not really matter who created the thread. – cen Nov 06 '15 at 13:45
  • no, it's really matter ! because i don't want to do mysql_thread_init and msql_thread_end for every query. it's because i use a connection pool .. – zeus Nov 07 '15 at 16:25

0 Answers0