[Lazarus] Database access and thread-safety

Michael Van Canneyt michael at freepascal.org
Mon Nov 8 09:12:08 CET 2010

On Mon, 8 Nov 2010, Mark Morgan Lloyd wrote:

> Can anybody say whether a TSQLQuery can be activated in a thread, provided 
> that the portions of the app which activate it and the portions which read 
> data from it are protected by critical sections?
> I'm trying to increase the responsiveness of a program that I'm using as a 
> testbed before moving onto anything critical. Backend is PostgreSQL accessed 
> via a TPQConnection.

If the postgres client library is thread safe, then SQLDB (and in particular
TSQLQuery) should also be thread safe.


More information about the Lazarus mailing list