Signaling with Events

Coordination of access to shared resources is just one (data-centric) concern of writing multithreaded applications. Another is to coordinate different pieces of an algorithm or a set of components to coordinate among themselves. This is where events (in the threading sense of the word, not as in the C# construct) enter the picture.

The primitive operations associated with an event are setting (or signaling) the event or waiting on it. You can compare this to a symphonic orchestra, where different players can be waiting for the orchestra conductor to give a signal to start playing their part of the symphony. No wonder that the word orchestration is often used in this context.

Two kinds of events exist. They differ in the ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

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