Chapter 5. Threading Libraries

image with no caption

This chapter will review some of the details of the threading libraries used in subsequent chapters to implement the algorithms. I am assuming that you are already familiar with at least one of these threading methods. I’m not expecting proficiency, but I hope you’ve at least tried some coding examples when you first looked at learning how to write threaded code.

If you are unfamiliar with any of the threading libraries I’ve used here, this chapter should provide you with enough details to understand the algorithms implemented with such a library and any library-specific features that are used. (If you want more details, find one of the fine reference texts or an online tutorial.) Otherwise, this should be a review. If you’re chomping at the bit to get into the algorithm design parts of the book, you can skip over this chapter for now and come back when you might have a question about syntax or threading.

Implicit Threading

Implicit threading libraries take care of much of the minutiae needed to create, manage, and (to some extent) synchronize threads. All the little niggly details are hidden from programmers to make concurrent programming easier to implement and understand. Of course, by not allowing (forcing?) you to deal with these details, the expressiveness and flexibility of implicit threading libraries are not as great as you might find with explicit ...

Get The Art of Concurrency 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.