- What are threads?
- Why do you think I should care about them?
- Where would you suggest I go to learn more (I'm working in Delphi, if that matters).
Thanks! -- Al C.
Thanks! -- Al C.
Threads allow you to utilize multiple processors or cores in a CPU, so they offer tremendous speedups when used properly on specific machines.
A little history from an "old timer": when I first heard about threads, they were referred to as "threads of control".
One of the earlier popular threading libraries was (and still is) "pthreads" or "POSIX Threads". It was derived from the Concert Multithread Architecture from Digital Equipment Corporation. It's notable that the documentation for pthreads still uses the term "thread of control". From an online man page for pthread_create:
pthread_create creates a new thread of control that executes concurrently with the calling thread.
You should care about threads because everything you do on a computer is done in a thread. Even the simplest "Hello, world" program contains at least a single thread.
Things get more interesting with multiple threads. In fact, they get too interesting if you're not careful!