Subject Re: fbclient.dll thread safe ?
Author jnfbr
Thanks Friends

Best Regards

Jed

--- In firebird-support@yahoogroups.com, Phil Shrimpton <phil@s...>
wrote:
> 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)
>
> Phil
>
> --
> 7:51am up 1 day, 15:50, 1 user, load average: 0.27, 0.11, 0.08
> ICQ: 760757 | AIM: pjshrimpton | Y!: pjshrimpton | pjshrimpton@j...