I reading high frequency data through tcp and with following code
while (1) {
lrev = recv(fd, buff, 80, MSG_WAITALL);
dowork();
}
I am running this code through a thread and assigned this thread to a specific CPU core. I can see that the particular core using 100% CPU. Is it because while(1) loop ? Is it good or bad for the latency purpose ?
My process have 5 threads and each thread is running on separate core. My total cpu usage is around 400%.
Thanks
recv
:/ - Captain Obvlious