Threading Choices

There are three primary threading approaches: monolithic, small-scale, and large-scale. Monolithic threading, in its simplest incarnation, is just a typical simple program that has only one thread of control. However, in its more sophisticated forms, monolithically threaded programs can use asynchronous I/O to perform logically concurrent and independent activities. The monolithic, asynchronous model relies on structures internal to the program to monitor the state of the program's constituent pieces, and it relies on polling to test the availability of I/O within those pieces. Using asynchronous I/O guarantees: one, that no subtask will block the entire task because some I/O request is not immediately satisfied; and two, that ...

Get Efficient C++ Performance Programming Techniques now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.