Have you ever tried to use a thread in a Delphi form?
Then you know the problems!

This is just a brief overview of my talk about common problems. If you’d like to hear more, please attend my session at the Delphi Summit 2025 in Amsterdam.
To be clear: Threads are not a silver bullet that will automatically speed up your application wherever you use them. On the other hand, there are definitely cases where code must be executed in a background thread.
But where should we draw the line?
Writing to the UI is a clear boundary — of course — but for this we can use Queue
or Synchronize
, as most of us already know. However, using Synchronize
in every case is almost like not using threads at all, because we still have to wait for the UI thread to do its job. This often results in worse performance, not better.
So, what is the right way to use threads in your Delphi forms?
In my talk, I’ll show examples of bad, not-so-bad, and good practices for using threads effectively.
After the event I will post more infos on this topic.
No comments:
Post a Comment