8#ifndef INKSCAPE_DISPLAY_DISPATCH_POOL_H
9#define INKSCAPE_DISPLAY_DISPATCH_POOL_H
11#include <condition_variable>
80 dispatch(count, std::forward<F>(function));
General-purpose, parallel thread dispatch mechanism.
std::function< void(global_id, local_id)> dispatch_func
global_id _available_work
void execute_batch(std::unique_lock< std::mutex > &lk, local_id id, int thread_count)
std::condition_variable _completed_cv
global_id _completed_work
void thread_func(local_id id)
void dispatch(int count, dispatch_func function)
std::condition_variable _available_cv
std::vector< std::thread > _threads
void dispatch_threshold(int count, bool threshold, F &&function)
std::mutex _dispatch_lock
Helper class to stream background task notifications as a series of messages.