* @brief Pause the pool. The workers will temporarily stop retrieving new tasks out of the queue, although any tasks already executing will keep running until they are finished. Only enabled if the flag `BS::tp::pause` is enabled in the template parameter. */
| 1723 | * @brief Pause the pool. The workers will temporarily stop retrieving new tasks out of the queue, although any tasks already executing will keep running until they are finished. Only enabled if the flag `BS::tp::pause` is enabled in the template parameter. |
| 1724 | */ |
| 1725 | BS_THREAD_POOL_IF_PAUSE_ENABLED |
| 1726 | void pause() |
| 1727 | { |
| 1728 | const std::scoped_lock tasks_lock(tasks_mutex); |
| 1729 | paused = true; |
| 1730 | } |
| 1731 | |
| 1732 | /** |
| 1733 | * @brief Purge all the tasks waiting in the queue. Tasks that are currently running will not be affected, but any tasks still waiting in the queue will be discarded, and will never be executed by the threads. Please note that there is no way to restore the purged tasks. |
nothing calls this directly
no outgoing calls
no test coverage detected