Abstract
Avoiding deadlock is the principal concern involved when working with multiple mutexes — however, this is typically less of a problem for multiple events where the prime difficulty is usually accommodating the unpredictable order in which different events may occur. There are basically two common modes of operation — either a thread can wait for one out of several events to be signalled or alternatively the thread can wait for all events in a set to become signalled simultaneously. In the latter case several threads may be waiting for some of the same events so that the various event sets overlap — to prevent holding up other threads unnecessarily a thread must only receive a signal for one of the events it is waiting for if it can do so for all such events together. The MULTI_EVENT class is designed to support both of these modes of operation — each MULTI_EVENT object manages a collection of events internally and each of these events may be referenced using a unique integer ‘cookie’ value. The key topics covered by this chapter include:
-
overlapping event sets
-
random event monitoring
-
the MULTI_EVENT class
-
implementation details for UNIX and Windows
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). Multiple Events. In: Multi-Threaded Programming in C++. Springer, London. https://doi.org/10.1007/978-1-4471-0725-5_9
Download citation
DOI: https://doi.org/10.1007/978-1-4471-0725-5_9
Publisher Name: Springer, London
Print ISBN: 978-1-4471-1188-7
Online ISBN: 978-1-4471-0725-5
eBook Packages: Springer Book Archive