<br clear="all">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.<br>
<br>I am not sure if the database library code is faulty or looking up the values in a thread is the problem<br>
<br>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?<br><br>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?<br>
<br>Do the other forms running in the main thread also require the critical section, or is that only for the stuff in the thread?<br><br>ie.<br><br>EnterCriticalSection(ModuleWithThreads.CriticalSection)<br>LookupDatabaseCode;<br>
LeaveCriticalSection(ModuleWithThreads.CriticalSection);<br><br><br><br>-- <br>Frank Church<br><br>=======================<br><a href="http://devblog.brahmancreations.com">http://devblog.brahmancreations.com</a><br>