MySQL Forums
Forum List  »  Connector/C++

Re: Constructing a MySQL Connector/C++ class object after one is destroyed
Posted by: David Hale
Date: November 07, 2023 01:16PM

It must be who spawns dothread_db() thread. I've discovered that if dothread_db is spawned from the main thread when the program starts, then it's always fine. My question says I get an error when dothread_db stops and is re-spawned, but the problem is not RE-starting it. The problem is from WHERE I start it. If I never spawn it from the main() thread but instead spawn it from another thread (e.g. a thread that listens for commands) then the Database object construction is fine, but writing to the database gives CDK Error: Bad file descriptor (generic:9), even though it's the first time.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Constructing a MySQL Connector/C++ class object after one is destroyed
211
November 07, 2023 01:16PM


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.