Subject Re: [firebird-support] Is the fb client library re-entrant? Even when sharing a connection?
Author Dmitry Yemanov
Bud Millwood wrote:
> 1. For separate threads that have their own connection handles, is the
> firebird client library re-entrant? Can two threads in this case both enter
> the client library, and furthermore, can they both execute transactions
> simultaneously? (for both Classic and Superserver, although I understand
> Classic will perform better)

Yes to all questions. But you have to synchronize the attach/detach
calls via a mutex.

> 2. For those threads that pool a single connection handle, but use different
> transaction handles, is the library re-entrant in this case, too?

Generally, no. In some cases the synchronization could be ensured by the
remote protocol code (as API calls are blocking at the socket layer) but
nobody guarantees that.