Subject Re: [ib-support] Firebird and threads
Author Brad Pepers
On November 2, 2001 08:26 am, Bill Morrison wrote:
> Obvious question, but does each of your threads have it's own connection to
> the database?

There is a pool of connections that are shared between the threads. When a
thread gets a request from a client, it tries to find an available database
connection. If it finds one, it marks it as unavailable and then uses it to
satisfy the clients request before setting it back to available. If there
are no database connections available, it waits on a wait condition which is
triggered every time a thread returns a database connection to the pool. All
the access to the pool is protected by a mutex and is thread safe.

So for the testing I was doing I had 5 clients connected sharing a pool of 3
database connections.

Brad Pepers