
Peter Dimov wrote:
4. MT-centric model
The general idea of an asynchronous callback dispatcher is sound, but the threading decision should be left to the user. The library should provide
void net::poll( timeout tm );
that delivers any pending callbacks from the context of the thread that called poll, and
void net::async_poll( error_callback );
that acts "as if" it executes net::poll( infinite ) repeatedly in one or more background threads. (error_callback will be called on errors; the synchronous variant will probably throw an exception instead.)
This means we have one global dispatcher for the library (completion queue in asynch case). Isn't there a need to have several dispatchers to be able to group connections to several dispatchers/pollers. /Michel