January 2003
Intermediate to advanced
896 pages
19h 58m
English
Any application you write already has a single thread. For example, in a Microsoft Visual C# application, there is a thread that runs the Main function, known as the primary thread. Any extra threads within that application are created by the application code as it runs and are known as secondary, or worker, threads. After your program creates and starts an extra thread, the operating system schedules it to run in parallel to the primary thread on the basis that only running threads will be scheduled for execution. Your application now appears to be performing two tasks at once.
You can create new threads explicitly by constructing new Thread objects or implicitly by using the Timer class or the ThreadPool
Read now
Unlock full access