by Kambiz » June 30th, 2005, 3:45 pm
When we tell something is not thread safe, it means the stuff should not be accessed or/and modified by more than one thread at the same time. So, if we guarantee that only one thread at the same time be accessed or/and modified, everything works fine.
Actually using Synchronize method of TThread class causes the main VCL thread calls the procedure. This increases the chance of dead-lock. And in the other hand, we don't use all benefits of multi-threading. Windows provides several objects for synchronization (Mutex, Critical Section, Event, and Semaphore), which I would rather to use them.
In TFindFile, I suppose when somebody uses the component as threaded, she/he knows how to use it in a thread safe maner. In my demo program there was no need for synchronization, but in some other usages the synchronization could be a must.
There's no inline function in Delphi (and gerenaly Pascal). I guess you mean nested functions. If so, it's just for making the code modular and easier to understand/manage.
Kambiz