* @brief Unpause the pool. The workers will resume retrieving new tasks out of the queue. Only enabled if the flag `BS::tp::pause` is enabled in the template parameter. */
| 1947 | * @brief Unpause the pool. The workers will resume retrieving new tasks out of the queue. Only enabled if the flag `BS::tp::pause` is enabled in the template parameter. |
| 1948 | */ |
| 1949 | BS_THREAD_POOL_IF_PAUSE_ENABLED |
| 1950 | void unpause() |
| 1951 | { |
| 1952 | { |
| 1953 | const std::scoped_lock tasks_lock(tasks_mutex); |
| 1954 | paused = false; |
| 1955 | } |
| 1956 | task_available_cv.notify_all(); |
| 1957 | } |
| 1958 | |
| 1959 | /** |
| 1960 | * @brief Wait for tasks to be completed. Normally, this function waits for all tasks, both those that are currently running in the threads and those that are still waiting in the queue. However, if the pool is paused, this function only waits for the currently running tasks (otherwise it would wait forever). Note: To wait for just one specific task, use `submit_task()` instead, and call the `wait()` member function of the generated future. |
nothing calls this directly
no outgoing calls
no test coverage detected