O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17.4. Threading guidelines

Use threads only when there is a real need for multi-threading, such as if you have multiple CPUs and are writing a computation intensive application which has a user interface portion. While one thread deals with user interaction, the other can be performing background computation concurrently.

Avoid using multiple threads unnecessarily because not only does writing such applications require a higher level of expertise, it is also often difficult to debug threaded applications. [20]

[20] This is true especially for bugs due to inconsistent state which resulted from thread synchronization problems. The difficulty is exacerbated by the fact that multi-threaded applications always give different outputs depending on various ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required