patrick

patrick

  • NA
  • 397
  • 0

Mysql singleton threading issue

Jun 22 2010 4:54 PM
Hi,  I have a program that works well.  But I need to expand upon a portion, and need to use threading.  Here is my problem.  Every class uses the same connection, which has never been a problem because i didnt multithread.  Now I have a form that needs to run itself independently, but uses much of the same classes and operations that my main forms do.  Since I used the same connection for everything, I am throwing constant exceptions because the connection will often be in use.  Is there a more simple way to get around this that doesnt involve rewriting/overloading all my old work?

Answers (6)