The thread-safety properties of the standard Firebird client library vary according to the following:
Determining whether the client library you're using is thread-safe can be quite confusing. This document aims to reduce that confusion by defining what thread-safety means in the context of the Firebird client library, then presenting a table that specifies which client library configurations are thread-safe.
Note that this document deals only with the standard Firebird client library that underlies the Firebird C API. It has no relevance to the clean-slate reimplementations in access libraries such as Jaybird.
Currently, the highest level of concurrency supported by any version of the Firebird client library is "thread-safety at the connection level".
When we say that the Firebird client library is "thread-safe at the connection level", we mean that it is safe to use a particular connection in only one thread at a time, although the same connection can be manipulated by different threads in a serial fashion, and different connections can be manipulated by different threads in parallel.
For example, in a multithreaded application server, it is safe for a particular connection to be leased from a connection pool by Thread A, used, and returned to the pool for later lease by Thread B. It is not safe for Thread A and Thread B to use the same connection at the same time.
FB Version | OS | FB Architecture | Remote Or Local | Thread-Safe? |
1.0.3 | Windows | SuperServer | Local | N |
Remote | Y | |||
Classic | Local | [No such config.] | ||
Remote | [No such config.] | |||
Embedded | Local | [No such config.] | ||
Remote | [No such config.] | |||
Linux | SuperServer | Local | [No such config.] | |
Remote | N | |||
Classic | Local | N | ||
Remote | N | |||
1.5.3 | Windows | SuperServer | Local | N |
Remote | Y | |||
Classic | Local | [No such config.] | ||
Remote | Y | |||
Embedded | Local | Y | ||
Remote | [No such config.] | |||
Linux | SuperServer | Local | [No such config.] | |
Remote | Y | |||
Classic | Local | N | ||
Remote | N | |||
2.0.0 | Windows | SuperServer | Local | Y |
Remote | Y | |||
Classic | Local | Y | ||
Remote | Y | |||
Embedded | Local | Y | ||
Remote | [No such config.] | |||
Linux | SuperServer | Local | [No such config.] | |
Remote | Y | |||
Classic | Local | N | ||
Remote | N | |||
Vulcan | Windows | N/A | Local | Y |
N/A | Remote | Y | ||
Linux | N/A | Local | Y | |
N/A | Remote | Y |
This document was written by David Rushby, with assistance from Dmitry Yemanov. Errors are attributable to Rushby rather than Yemanov, and should be reported by e-mail to woodsplitter@rocketmail.com.