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.
I am not sure if the database library code is faulty or looking up the values in a thread is the problem 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? The threads are run in a different module from the one with database lookup. Should the CriticalSection be in DataModule containing the threads or in the DataModule with the lookup? Do the other forms running in the main thread also require the critical section, or is that only for the stuff in the thread? ie. EnterCriticalSection(ModuleWithThreads.CriticalSection) LookupDatabaseCode; LeaveCriticalSection(ModuleWithThreads.CriticalSection); -- Frank Church ======================= http://devblog.brahmancreations.com
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus