.. index:: pair: class; EE::System::ThreadPool .. _doxid-class_e_e_1_1_system_1_1_thread_pool: class EE::System::ThreadPool ============================ .. toctree:: :hidden: struct_EE_System_ThreadPool_Work.rst .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class ThreadPool: private :ref:`EE::NonCopyable` { public: // structs struct :ref:`Work`; // construction :target:`ThreadPool`(:ref:`Uint32` numThreads, bool terminateOnClose = false); virtual :target:`~ThreadPool`(); // methods static std::shared_ptr :target:`createShared`(:ref:`Uint32` numThreads, bool terminateOnClose = false); static std::unique_ptr :target:`createUnique`(:ref:`Uint32` numThreads, bool terminateOnClose = false); static ThreadPool* :target:`createRaw`(:ref:`Uint32` numThreads, bool terminateOnClose = false); :ref:`Uint64` :target:`run`(const std::function& func, const std::function`&)>& doneCallback = [](const :ref:`Uint64`&) {}, const :ref:`Uint64`& tag = 0); :ref:`Uint32` :target:`numThreads`() const; bool :target:`terminateOnClose`() const; void :target:`setTerminateOnClose`(bool terminateOnClose); bool :target:`existsIdInQueue`(const :ref:`Uint64`& id); bool :target:`existsTagInQueue`(const :ref:`Uint64`& tag); bool :target:`removeId`(const :ref:`Uint64`& id); bool :target:`removeWithTag`(const :ref:`Uint64`& tag); };