mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-31 07:10:28 -04:00
add some thread names
This commit is contained in:
parent
416f2d588e
commit
5a59faa077
5 changed files with 11 additions and 0 deletions
loader/src
|
@ -321,6 +321,8 @@ void Index::Impl::downloadIndex(std::string commitHash) {
|
|||
.into(targetFile)
|
||||
.then([this, targetFile, commitHash](auto) {
|
||||
std::thread([=, this]() {
|
||||
thread::setName("Index Update");
|
||||
|
||||
auto targetDir = dirs::getIndexDir() / "v0";
|
||||
// delete old unzipped index
|
||||
std::error_code ec;
|
||||
|
@ -376,6 +378,7 @@ void Index::Impl::downloadIndex(std::string commitHash) {
|
|||
void Index::Impl::checkForUpdates() {
|
||||
if (m_isUpToDate) {
|
||||
std::thread([this](){
|
||||
thread::setName("Index Update");
|
||||
this->updateFromLocalTree();
|
||||
}).detach();
|
||||
return;
|
||||
|
@ -407,6 +410,7 @@ void Index::Impl::checkForUpdates() {
|
|||
ghc::filesystem::exists(dirs::getIndexDir() / "v0" / "config.json")
|
||||
) {
|
||||
std::thread([this](){
|
||||
thread::setName("Index Update");
|
||||
this->updateFromLocalTree();
|
||||
}).detach();
|
||||
}
|
||||
|
|
|
@ -439,6 +439,7 @@ void Loader::Impl::loadModGraph(Mod* node, bool early) {
|
|||
else {
|
||||
auto nest = log::saveNest();
|
||||
std::thread([=, this]() {
|
||||
thread::setName("Mod Unzip");
|
||||
log::loadNest(nest);
|
||||
auto res = unzipFunction();
|
||||
this->queueInMainThread([=, this]() {
|
||||
|
|
|
@ -112,6 +112,8 @@ CFDataRef msgPortCallback(CFMessagePortRef port, SInt32 messageID, CFDataRef dat
|
|||
|
||||
void geode::ipc::setup() {
|
||||
std::thread([]() {
|
||||
thread::setName("Geode Main IPC");
|
||||
|
||||
CFStringRef portName = CFStringCreateWithCString(NULL, IPC_PORT_NAME, kCFStringEncodingUTF8);
|
||||
|
||||
CFMessagePortRef localPort =
|
||||
|
|
|
@ -32,6 +32,8 @@ FileWatcher::~FileWatcher() {
|
|||
}
|
||||
|
||||
void FileWatcher::watch() {
|
||||
geode::utils::thread::setName("File Watcher");
|
||||
|
||||
HANDLE handle = (HANDLE)m_platformHandle;
|
||||
while (WaitForSingleObject(handle, 10000) == WAIT_OBJECT_0) {
|
||||
if (m_exiting) return;
|
||||
|
|
|
@ -252,6 +252,8 @@ SentAsyncWebRequest::Impl::Impl(SentAsyncWebRequest* self, AsyncWebRequest const
|
|||
auto timeoutSeconds = req.m_impl->m_timeoutSeconds;
|
||||
|
||||
std::thread([this, timeoutSeconds]() {
|
||||
thread::setName("Curl Request");
|
||||
|
||||
AWAIT_RESUME();
|
||||
|
||||
auto curl = curl_easy_init();
|
||||
|
|
Loading…
Add table
Reference in a new issue