What I Did:
I use multiple threads in my applications to let the app do multiple things at once.
The simplest example is to run a loop without affecting the responsiveness of the app.
Its all about doing many things at once without slowing down, and in some cases shutting down, other parts of the application.
Thats mostly what I've used threading for; looping.
I am working on a GUI library for Delphi/RAD Studio
and for that you need a lot of processing power,
AND not for processing the bitmaps or the effects,
but for looping through all objects.
How I Did It:I did it with the OmniThread Library. It is very powerful yet very easy to use. What I did was simply to create a thread, tell it what procedure I want to run and then activate the thread when needed.
- Use threads as much as possible, but dont use too many threads!