Wrap-Up
Threads-and-locks programming probably divides opinion more than any of the other techniques weâll cover. It has a reputation for being fiendishly difficult to get right, and plenty of programmers shrink from it, avoiding multithreaded programming at all costs. Others donât understand the fussâa few simple rules need to be followed, and if you follow them itâs no harder than any other form of programming.
Letâs look at its strengths and weaknesses.
Strengths
The primary strength of threads and locks is the modelâs broad applicability. As you might expect, given that theyâre the basis upon which many of the approaches weâll cover later are built, they can be applied to a very wide range of problems. Because they are ...
Get Seven Concurrency Models in Seven Weeks 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.