On Friday 05 September 2003 06:38, Olivier Mascia wrote:
Hi,
> > Is fbclient.dll thread safe ?
>
> Not completely, while I might have missed recent developments.
> It is at least safe to use it in a multi-threaded app, as long as all
> work that you do with one connection handle is done through one same
> thread.
Just to expand on this as I have just finished testing a large multi-threaded
app with FB1.5...
A 'connection' should only ever be accessed by one thread at once, it does
not have to be the same thread that opened the connection, as long as it is
the only thread, or you get a deadlock
Ideally every thread should have its own connection which will avoid
deadlocks all together, but if you are sharing a 'connection' amongst threads
you will need to protect the db access code with a Critical Section (or the
equivilent in the language you are using)