Show human-readable thread ID in log messages.

This helps debug some multithreading issues.
This commit is contained in:
Jordan Bancino 2023-05-27 17:10:07 +00:00
parent 5694a609eb
commit c5cfdb9894
4 changed files with 46 additions and 3 deletions

View file

@ -79,7 +79,6 @@ struct HttpServerContext
typedef struct HttpServerWorkerThreadArgs
{
HttpServer *server;
int id;
pthread_t thread;
} HttpServerWorkerThreadArgs;
@ -625,7 +624,6 @@ HttpServerEventThread(void *args)
}
workerThread->server = server;
workerThread->id = i;
if (pthread_create(&workerThread->thread, NULL, HttpServerWorkerThread, workerThread) != 0)
{
@ -644,7 +642,6 @@ HttpServerEventThread(void *args)
int connFd;
int pollResult;
pollResult = poll(pollFds, 1, 500);
if (pollResult < 0)