Hi Acer,
I would like to adapt my class to asio for offering async_do_something(param, callback) interfaces.
http://sourceforge.net/projects/asio-samples/ especially (SVN): https://asio-samples.svn.sourceforge.net/svnroot/asio-samples/trunk/include/... https://asio-samples.svn.sourceforge.net/svnroot/asio-samples/trunk/include/... or https://asio-samples.svn.sourceforge.net/svnroot/asio-samples/trunk/include/... https://asio-samples.svn.sourceforge.net/svnroot/asio-samples/trunk/include/...
After reading examples presented in asio/examples/services/ and some asio source code.
I found the example does not do invoke callback stuff (e.g. asio/examples/service/logger_service.cpp).
In case of asio source code, there are classes such as detail::wait_handler<> that wrap user callbacks for invoked later.
It's not a wrapper for deferred invocation. Here's my implementation of handler parking (Asio custom memory allocation and custom invocation strategy are supported): https://asio-samples.svn.sourceforge.net/svnroot/asio-samples/trunk/include/... Regards, Marat Abrarov.