Subject: Re: [boost] [gsoc-2013] Boost.Thread/ThreadPool project
From: Niall Douglas (ndouglas_at_[hidden])
Date: 2013-05-03 13:26:55
> Le 02/05/13 18:01, 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
> 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
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 :(
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk