Abstract
Applications written in C++ have traditionally used objects in a ‘passive’ manner — each C++ object provides a collection of services which may be invoked from external code by calling functions defined in the object’s interface. However, in a multi-threaded program C++ objects can be transformed into ‘active’ entities that perform processing tasks independently of external code — to become active an object simply has to run one or more threads internally. This chapter firstly examines the different patterns of execution flow that are possible with passive and active object paradigms — various implementations of the MUX and DEMUX classes are then described to illustrate the different techniques involved in creating passive or active classes. The key topics covered in the chapter include:
-
passive and active C++ classes
-
thread execution flow diagrams
-
the TRANSFER class
-
the MUX and DEMUX classes
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2000 Springer-Verlag London Limited
About this chapter
Cite this chapter
Walmsley, M. (2000). Objects. In: Multi-Threaded Programming in C++. Springer, London. https://doi.org/10.1007/978-1-4471-0725-5_6
Download citation
DOI: https://doi.org/10.1007/978-1-4471-0725-5_6
Publisher Name: Springer, London
Print ISBN: 978-1-4471-1188-7
Online ISBN: 978-1-4471-0725-5
eBook Packages: Springer Book Archive