Subject: [Boost-bugs] [Boost C++ Libraries] #8513: Add a basic thread_pool executor.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-28 20:54:58
#8513: Add a basic thread_pool executor.
------------------------------+---------------------------------------------
Reporter: viboes | Owner: anthonyw
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.54.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
that could have this interface
{{{
class thread_pool
{
public:
BOOST_THREAD_NO_COPYABLE(thread_pool)
/**
* Effects: creates a thread pool that runs closures on @c
thread_count threads.
*/
thread_pool(unsigned const thread_count =
thread_t::hardware_concurrency());
/**
* Effects: Destroys the thread pool.
* Synchronization: The completion of all the closures happen before
the completion of the thread pool destructor.
*/
~thread_pool();
/**
* Effects: close the thread_pool for submissions. The worker threads
will work until
*/
void close();
/**
* Returns: whether the pool is closed for submissions.
*/
bool is_close();
/**
* Effects: The specified function will be scheduled for execution at
some point in the future.
* If invoking closure throws an exception the thread pool will call
std::terminate, as is the case with threads.
* Synchronization: completion of closure on a particular thread
happens before destruction of thread's thread local variables.
* Throws: sync_queue_is_closed if the thread pool is closed.
*
*/
template <typename Closure>
void submit(BOOST_THREAD_RV_REFClousure) closure);
/**
* This must be called from an scheduled task.
* Effects: reschedule functions until pred()
*/
template <typename Pred>
void reschedule_until(Pred const& pred);
};
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8513> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC