/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
py-modules-0.2.7
base/thread_pool.hpp
28 строк
547 B
Sergey Yershov
Remove using std from base
28 дек 2016, 15:24
28 дек 2016, 15:24
20c0eb7
Код
Авторство
О чём код?
#pragma once #include "base/base.hpp" #include <functional> namespace threads { class IRoutine; typedef std::function<void(threads::IRoutine *)> TFinishRoutineFn; class ThreadPool { public: ThreadPool(size_t size, const TFinishRoutineFn & finishFn); ~ThreadPool(); // ThreadPool will not delete routine. You can delete it in finish_routine_fn if need void PushBack(threads::IRoutine * routine); void PushFront(threads::IRoutine * routine); void Stop(); private: class Impl; Impl * m_impl; }; }