mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -05:00
name ipc threads
This commit is contained in:
parent
ed5b5c9685
commit
80f387d9d1
1 changed files with 7 additions and 3 deletions
|
@ -101,7 +101,7 @@ void ipcPipeThread(HANDLE pipe) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Loader::Impl::setupIPC() {
|
void Loader::Impl::setupIPC() {
|
||||||
std::thread([]() {
|
std::thread ipcThread([]() {
|
||||||
while (true) {
|
while (true) {
|
||||||
auto pipe = CreateNamedPipeA(
|
auto pipe = CreateNamedPipeA(
|
||||||
IPC_PIPE_NAME,
|
IPC_PIPE_NAME,
|
||||||
|
@ -125,14 +125,18 @@ void Loader::Impl::setupIPC() {
|
||||||
// log::debug("Waiting for pipe connections");
|
// log::debug("Waiting for pipe connections");
|
||||||
if (ConnectNamedPipe(pipe, nullptr)) {
|
if (ConnectNamedPipe(pipe, nullptr)) {
|
||||||
// log::debug("Got connection, creating thread");
|
// log::debug("Got connection, creating thread");
|
||||||
std::thread(&ipcPipeThread, pipe).detach();
|
std::thread pipeThread(&ipcPipeThread, pipe);
|
||||||
|
SetThreadDescription(pipeThread.native_handle(), L"Geode IPC Pipe");
|
||||||
|
pipeThread.detach();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// log::debug("No connection, cleaning pipe");
|
// log::debug("No connection, cleaning pipe");
|
||||||
CloseHandle(pipe);
|
CloseHandle(pipe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).detach();
|
});
|
||||||
|
SetThreadDescription(ipcThread.native_handle(), L"Geode Main IPC");
|
||||||
|
ipcThread.detach();
|
||||||
|
|
||||||
log::debug("IPC set up");
|
log::debug("IPC set up");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue