[Lazarus] Database access and thread-safety

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Nov 8 08:53:39 CET 2010


Op 2010-11-08 09:19, Mark Morgan Lloyd het geskryf:
> 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?


In our company we use tiOPF with the SqlDB components as our persistence
layer, and our commercial apps do data access via multiple threads without
problems (specially now that I fixed some of the Thread.WaitFor problems in
FPC+tiOPF+Linux). An example usage: While the user sits at the login prompt
of our application, our app loads up some commonly used lookup list data in
a separate thread. Reporting queries also gets done in a separate thread.

We primarily talk to a Firebird RDBMS, but I have tested PostgreSQL for a
short while too, to see if that DB works.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net:8080/fpgui/





More information about the Lazarus mailing list