Multiple threads are best used for:
Background tasks such as data calculations, database queries, and input gathering, which do not directly involve window management or user interface.
Operations that are independent from one another that can benefit from concurrent processing.
Asynchronous tasks such as polling on a serial port.
If your application contains tasks that require a private address space and private resources, you can protect them from the activities of other threads by creating multiple processes rather than multiple threads. See Working with Multiple Processes.
The sections that follow discuss the steps you need to consider in creating a multithread application: