Mega Code Archive

 
Categories / Delphi / Examples
 

Threads in delphi 6

The most important changes in thread programming with Delphi 6 versus Delphi 5 are: Synchronize() can only be called from secondary threads and not the main thread. CheckSynchronize() must be pumped. Under a normal GUI the TApplication object does this for you in its Idle method. Unhandled exceptions in TThread.Execute() will no longer bring down the entire app. ThreadProc now has a try/except and there's now a TThread.FatalException property. This means that if you are using a try/except for the sole purpose of app stability (and not to handle the exception) then this try/except is now redundant.