refactor: remove dead code and fix thread safety in console_helpers

This commit is contained in:
MatthewBeshay
2026-04-03 19:00:40 +11:00
parent 5bbb045e86
commit 116cf4887d
26 changed files with 93 additions and 597 deletions
+3 -6
View File
@@ -116,19 +116,16 @@ Connection::Connection(Socket* socket, const std::wstring& id,
m_hWakeReadThread = new C4JThread::Event;
m_hWakeWriteThread = new C4JThread::Event;
const char* szId = wstringtofilename(id);
std::string szId = wstringtofilename(id);
char readThreadName[256];
char writeThreadName[256];
sprintf(readThreadName, "%s read\n", szId);
sprintf(writeThreadName, "%s write\n", szId);
sprintf(readThreadName, "%s read\n", szId.c_str());
sprintf(writeThreadName, "%s write\n", szId.c_str());
readThread =
new C4JThread(runRead, (void*)this, readThreadName, READ_STACK_SIZE);
writeThread =
new C4JThread(runWrite, this, writeThreadName, WRITE_STACK_SIZE);
readThread->setProcessor(CPU_CORE_CONNECTIONS);
writeThread->setProcessor(CPU_CORE_CONNECTIONS);
readThread->run();
writeThread->run();