Subject Re: Threading using multiple connections
Author hvlad
--- In, "Martijn Tonies" wrote:
> Hi Vlad,
> >> Can someone let me know if the following is thread-safe:
> >>
> >> - a client library from Firebird version 1, 1.5, 2 or 2.1
> >> - using a connection per thread
> >> - executing calls via multiple threads
> >
> > Add also: protect attach\detach calls with common mutex.
> You mean that connect/disconnect cannot be done while another
> thread is already waiting for the API to return, right?

It can be done of course, but there were reports about deadlocks in
fbclient when few threads executed attach\detach concurrently.
Note, you need to serialize attach\detach API's only, all other calls
is safe (as long as you follow thread per attachment rule).

Hope it is clear now,