#ifndef PKE_THREADING_HPP #define PKE_THREADING_HPP #include "pk.h" #include #include struct ThreadPoolHandle : public pk_bkt_arr_handle { }; constexpr ThreadPoolHandle ThreadPoolHandle_MAX = ThreadPoolHandle{ pk_bkt_arr_handle_MAX_constexpr }; void PkeThreads_Init(); ThreadPoolHandle PkeThreads_Init (uint8_t threadCount, uint8_t maxQueueCount, struct pk_membucket *bkt = nullptr); void PkeThreads_Reset (ThreadPoolHandle handle); bool PkeThreads_Enqueue (ThreadPoolHandle handle, std::packaged_task *job); uint32_t PkeThreads_GetQueueCount (ThreadPoolHandle handle); void PkeThreads_Pause (ThreadPoolHandle handle); void PkeThreads_Resume (ThreadPoolHandle handle); void PkeThreads_Shutdown (ThreadPoolHandle handle); void PkeThreads_Teardown (); void PkeThreads_Teardown (ThreadPoolHandle handle); #endif /* PKE_THREADING_HPP */