-
General Thread question
Is it important to know/use threads when doing Windows programs?
Can you give a (real) example where it's useful, and where you absolutely HAVE TO use it?
<edit>Ooops, double post. Sorry! (Isn't it possible to delete your own posts?). Cprogramming.com has been acting weird the whole day... for me at least... The rest of the WWW seems to work fine...</edit>
-
If you have any calculations to do that take any length of time then without multithreading your application you run the risk of losing all responsiveness from your user interface until those calculations are over. After a while programming for windows you will find you use threads more and more. Yes they are well worth learning/knowing about. Sooner or later you will need them.
-
The GUI part of a program is the primary thread in the application kernel process object. Thus, it can do one calculation at a time. You cannot enter a loop and still expect the program to draw lines and handle message queue.
Worker threads allows you to do calculation on separate threads.
Kuphryn