DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
discord_core_api::discord_core_internal::co_routine_thread_pool Class Reference

A class representing a coroutine-based thread pool. More...

#include <CoRoutineThreadPool.hpp>

Inherits discord_core_api::unordered_map< key_type_new, value_type_new >.

Public Member Functions

 co_routine_thread_pool ()
 Constructor to create a coroutine thread pool. initializes the worker threads.
 
void submitTask (std::coroutine_handle<> coro)
 Submit a coroutine task to the thread pool. More...
 

Member Function Documentation

◆ submitTask()

void discord_core_api::discord_core_internal::co_routine_thread_pool::submitTask ( std::coroutine_handle<>  coro)
inline
Parameters
corothe coroutine handle to submit.

Definition at line 89 of file CoRoutineThreadPool.hpp.

Here is the call graph for this function:

◆ threadFunction()

void discord_core_api::discord_core_internal::co_routine_thread_pool::threadFunction ( worker_thread thread,
std::stop_token  tokenNew 
)
inlineprotected
Parameters
threadA pointer to the current thread of execution.
tokenNewThe stop token for the thread.

Definition at line 134 of file CoRoutineThreadPool.hpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: