1
0
Fork 0
mirror of https://gitlab.com/niansa/cosched.git synced 2025-03-06 20:53:26 +01:00

Renamed ScheduledThread::enqueue to create_task

This commit is contained in:
niansa 2023-05-04 19:50:47 +02:00
parent 19b29577a1
commit 6a225e88df

View file

@ -38,7 +38,7 @@ public:
}
// DO NOT call from within a task
void enqueue(const std::string& task_name, const std::function<async::result<void> ()>& task_fcn) {
void create_task(const std::string& task_name, const std::function<async::result<void> ()>& task_fcn) {
// Enqueue function
{
std::scoped_lock L(queue_mutex);
@ -57,7 +57,7 @@ public:
// MUST already be running
void shutdown() {
enqueue("Shutdown Initiator", [this] () -> async::result<void> {
create_task("Shutdown Initiator", [this] () -> async::result<void> {
shutdown_requested = true;
co_return;
});