mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-05 21:48:55 +00:00
jthread
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
@@ -56,7 +55,7 @@ private:
|
|||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
Kernel::KEvent* completion_event;
|
Kernel::KEvent* completion_event;
|
||||||
|
|
||||||
std::thread worker;
|
std::jthread worker;
|
||||||
std::atomic<bool> cancel_requested{false};
|
std::atomic<bool> cancel_requested{false};
|
||||||
std::atomic<u32> error_code{0};
|
std::atomic<u32> error_code{0};
|
||||||
|
|
||||||
@@ -129,7 +128,7 @@ private:
|
|||||||
download_data.clear();
|
download_data.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
worker = std::thread(&IShopServiceAsync::WorkerThread, this);
|
worker = std::jthread(&IShopServiceAsync::WorkerThread, this);
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user