[Previous] [Contents] [Next]

When Not to Use Threads


It's a common mistake for those new to threads to attempt to deploy them in every application. This can be much worse than not having them at all! As with any other tool in your programming arsenal, you should use threads only when it's appropriate to do so. You should avoid using multiple threads in your application in at least the following cases (described in the following sections): when costs outweigh benefits, when you haven't benchmarked both cases, and when you can't come up with a reason to use threads.

[Previous] [Contents] [Next]