List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:March 5 2005 6:24am
Subject:Re: Using mysql++ with a server.
View as plain text  
Imperio59 wrote:

> library it uses for debugging is the multi-threaded library, so I 
> assumed that mysql++ ran it's code in a seperate thread, 

No, I chose to set the projects to link MySQL++ against the mulit-thread 
CRT libraries for two reasons:

1. It seemed to be most popular.  Since Visual C++ requires that you use 
the same CRT library for everything linked into a program, this seemed 
like the path of least resistance.

2. It gives the _potential_ to use MySQL++ in a threaded program.

MySQL++ does not create its own threads.  If you want threads, you have 
create and manage them yourself.

> Another option was to start up the connection to the database when the 
> server loads and keep it alive all throughout the duration of a round, 
> but I think that would be a cheap and wrong way to do it...

MySQL database connections aren't expensive in any meaningful sense. 
The only possible problem is that you have to have some traffic on the 
connection periodically or the server (?) will shut it down.
Using mysql++ with a server.Imperio595 Mar
  • Re: Using mysql++ with a server.Earl Miles5 Mar
    • Re: Using mysql++ with a server.Warren Young5 Mar
  • Re: Using mysql++ with a server.Warren Young5 Mar
Re: Using mysql++ with a server.Imperio597 Mar