boost.png (6897 bytes)

PrevUpHomeNext

Demultiplexer

The demultiplexer must allow you specify that you would like to receive notification of some sort of events (system generated, based on your operations), and provide a way of delivering these notifications to you.

The demultiplexers provided by Giallo all model a common DemultiplexerConcept.

In Giallo, the proactor and reactor classes model the demultiplexer concept and provide a common interface to several different demultiplexer implementations.

Objects on which events should be demultiplexed are described to the demultiplexer using the arguments<> class. An instance of the relevant arguments<> type, configured to contain a completion function, and the descriptor of the object to demultiplex, is passed to the demultiplexer in an _proactoradd function. Any completion information is stored in the arguments<> before the completion routine is called.

arguments<> is implemented as a metafunction, which takes the demultiplexer, a tag for the type of object being demultiplexed, and the role that object is playing.

Questions

How should demux.run() behave when there are no events registered with the demultiplexer? block or exit.

DemultiplexerConcept

Copyright © 2004 Hugo Duncan

PrevUpHomeNext