boost::capy::thread_pool::stop

Request all worker threads to stop.

Synopsis

void
stop() noexcept;

Description

Signals all threads to exit after finishing their current work item. Queued work that has not started stays queued until the pool is destroyed, which abandons it. Does not wait for threads to exit.

If join is blocking on another thread, calling stop() causes it to stop waiting for outstanding work. The join() call still waits for worker threads to finish their current item and exit before returning.

Thread Safety

May be called concurrently from any thread, including a thread in this pool.

Created with MrDocs