Threads quite easily lend themselves to the familiar manager-worker model; a manager thread (often main()) creates worker threads on demand (or pools them); when work arises, a worker thread handles it. Think of busy web servers.
Manager-worker model
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.