-
Rob Swindell authored
Using Linux top, long-running (hundreds of hours) httpSess threads were seen consuming ~15% of a CPU core. This loop calls time() and yield() in a tight loop, so instead mswait(50) (milliseconds), which reduces the CPU utilization considerable (down to < 1%), but will slightly impact the frequency with which the events callbacks are invoked. A better scheme would be to block while waiting for an event or a timeout (e.g. 1 second), so this is not a great solution. More of a work-around.
Rob Swindell authoredUsing Linux top, long-running (hundreds of hours) httpSess threads were seen consuming ~15% of a CPU core. This loop calls time() and yield() in a tight loop, so instead mswait(50) (milliseconds), which reduces the CPU utilization considerable (down to < 1%), but will slightly impact the frequency with which the events callbacks are invoked. A better scheme would be to block while waiting for an event or a timeout (e.g. 1 second), so this is not a great solution. More of a work-around.
Loading