Logical separation

The threading model intuitively lends itself to letting the designer logically separate work. For example, a GUI frontend application might have a few threads managing the GUI state, waiting for and reacting to user input, and so on. Other threads could be used to handle the app's business logic. Not mixing the user interface (UI) with the business logic is a key element of good design.

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.