Opened 4 years ago

Closed 4 years ago

#8513 closed Feature Requests (fixed)

Async: Add a basic thread_pool executor.

Reported by: viboes Owned by: viboes
Milestone: Boost 1.56.0 Component: thread
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:


that could have this interface

  class 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.

     * 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);

Attachments (0)

Change History (4)

comment:1 Changed 4 years ago by viboes

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:2 Changed 4 years ago by viboes

Summary: Add a basic thread_pool executor.Async: Add a basic thread_pool executor.

comment:3 Changed 4 years ago by viboes

Milestone: To Be DeterminedBoost 1.56.0

Committed revision [85855],[85863].

Last edited 4 years ago by viboes (previous) (diff)

comment:4 Changed 4 years ago by viboes

Resolution: fixed
Status: assignedclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain viboes.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.