I changed some values in some threaded code from using constants to looking up the values from a database and I have been getting errors all the time, that values which are present in the database are missed by the sequential scan. I have been getting some Externa SIGSEGVs a lot.
The minimum requirement for multithreaded db access is to use a separate db connection for every thread and transaction isolation. I am not sure if the database library code is faulty or looking up the values in a thread is the problem Some database client libraries have problems with multithreading or have threadsafe versions (fe. libmysql.dll is not threadsafe in the standard version). The database lookup code is in a data module running in the main thread. Do I have to use a critical section in data module containing the threads to the database lookup? No. That is trying to solve the problem in the wrong place. Ludo
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
