From: Jeff Garland (jeff_at_[hidden])
Date: 2005-12-19 19:56:08


On Mon, 19 Dec 2005 19:43:00 -0500, Cliff Green wrote
> >> The problem with the above apporach is that most code
> >>will end up
> >> using the global demuxer ...
>
> > We had this exact problem with a large application built
> >atop
> > ACE. Within ACE, there are a few areas where one can
> >refer to "/the/
> > reactor" rather than "/a/ reactor" or "/this/ reactor ...
>
> I really dislike the ACE singleton interface in the
> Reactor (and in some other classes), for the same reasons
> already described. In particular, an application might use
> a library that internally uses the Asio singleton demuxer
> - now the application's use of the singleton demuxer might
> conflict. This dislike is based on real-life use cases
> (with ACE), btw. Please don't add a singleton demuxer
> interface.

One more voice against this...I've had similar issues with singletons in ACE
and other places. There would have to be extreme justification to introduce a
singleton into the asio interface. Small simplification for end users isn't
enough for me. Peter's points are right on the mark...

Jeff