We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug read thread high CPU usage on linux(centos 7)
To Reproduce compile and run examples\CommNoGui\CSerialPortDemoNoGui run top or htop command
$ htop CPU[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Tasks: 40, 59 thr; 1 running PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 12165 root 20 0 14980 2884 2684 R 99.1 0.1 0:26.62 ./CSerialPortDemoNoGui
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered:
use sleep could solve high cpu usage problem. for(;;) is better than while(true)
for(;;)
while(true)
for(;;) { //do sth. usleep(1); }
Sorry, something went wrong.
[fixed] #42 high cpu usage problem on unix
ed6bfb0
Signed-off-by: itas109 <itas109@qq.com>
[fixed] #42 CSerialPortDemoNoGui high CPU usage problem
35d5c8c
No branches or pull requests
Describe the bug
read thread high CPU usage on linux(centos 7)
To Reproduce
compile and run examples\CommNoGui\CSerialPortDemoNoGui
run top or htop command
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: