O'Reilly logo

Shared Memory Application Programming by Victor Alessandrini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12

Further Thread Pools

Abstract

The thread management utilities proposed in the vath library are discussed in this chapter: the SPool and NPool thread pool classes implementing, respectively, a thread-centric or a task-centric programming environment. The NPool class has an internal task scheduler that is less refined than those available in OpenMP or TBB, but the fact that these pools are explicit—users can create as many pools as they want or need, and they can be combined—simplifies the programming of certain parallel contexts. These classes introduce the notion of a parallel job as a C++ object, and the public user interfaces are very simple to use. Several examples are proposed for testing the pool operations, and at the end ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required