Threads in an Object-Oriented World

  • Allen Holub


In the previous chapters, I’ve looked at low-level solutions to threading problems: locks of various sorts, timers, and so forth. This chapter moves on to discuss architectural solutions to threading problems. We’ll look at threads from the perspective of an OO designer, and at how to implement threads in an OO environment, focusing on the implementation of asynchronous methods. Along the way, I’ll look at another design pattern: Command—a means of implementing function pointers in an object-oriented way. I’ll also look at an architectural-level solution to the threading-complexity problem: namely the thread pool, which is useful for minimizing thread-creation overhead. Finally, I’ll demonstrate the practical application of a thread pool by showing you how to implement a server-side socket’s “accept” loop efficiently.


Asynchronous Message Public Class Object Argument Spin Lock Thread Pool 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Allen I. Holub 2000

Authors and Affiliations

  • Allen Holub

There are no affiliations available

Personalised recommendations