Subject | Re: [ib-support] Firebird and threads |
---|---|
Author | Brad Pepers |
Post date | 2001-11-02T21:50:07Z |
On November 2, 2001 08:26 am, Bill Morrison wrote:
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
brad@...
> Obvious question, but does each of your threads have it's own connection toThere is a pool of connections that are shared between the threads. When a
> the database?
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
brad@...