Chapter 6Threading
Multithreading is one of the great double-edged swords of programming. If it’s done correctly, it can be a real boon to your application; done incorrectly, it leads to strange, unreproducible errors in the application. Multithreading has a tendency to polarize developers: they either swear that it’s necessary for any application to perform properly or declare it’s to be avoided at all costs. The truth, of course, is somewhere in the middle. Multithreading is a vital piece of the overall performance puzzle. While adding more threads won’t automatically make your application faster, it can make your application “feel” faster to the user. That perception is what we’ll focus on in this chapter.
It’s a common misconception among ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access