Le 03/05/13 19:26, Niall Douglas a écrit :
That's orthogonal. Boost.Asio provides the funding blocks. A nicer interface that doesn't require an explicit continuation passing style transformation can be built with Boost.Context or a similar library. But it probably needs a future implementation that integrates with ASIO, which is one of the point of Niall Douglas. Spot on. Especially as parts of ASIO are due to enter with TR2. I worry
a thread pool designed without ASIO in mind would become an orphan isolate. What a ThreadPool must provide to satisfy the ASIO requirements? That's a very good question. And for me to answer in specifics I'd need to
Le 02/05/13 18:01, Niall Douglas a ?crit : that think deeply about the issue, and study examples, neither of which time currently allows given C++Now is just around the corner.
All I can say right now - and I agree this isn't very helpful - is make it compatible with opaque third party event loop dispatchers such as Qt's QCoreApplication and QRunnable. Because Qt's implementation details iare opaque to external code, if you can meet compatibility with that you'll probably be compatible with anything Boost.ASIO can come up with, especially as most of Boost.ASIO is header defined.
I appreciate that isn't very helpful. Thread pool design is hard :(
I wish you a good C++ Now. I would like to be there also :( I will try to digest QT and understand better ASIO to see if I can find it myself. Anyway, let me know if you have more helpful comments when you will have time. Best, Vicente