QThread CPU Problem
Unsolved
QML and Qt Quick
-
Hello,
I using QThread for 2 function but this qthreads using so much CPU. Where is the problem can u help me please ?NOT
When i deleting while(1) in interfactothread1test.cpp CPU %0 working good but i need this function. What can i use instead of while(1) ?My codes here
interfactothread1test.h
https://pastebin.com/AGnFK8v7interfactothread1test.cpp
https://pastebin.com/Edmdhtzythread1test.h
https://pastebin.com/YnR9KgiBthread1test.cpp
https://pastebin.com/9Sz08q5nmain.cpp
https://pastebin.com/jg0M4n3eThank you!
-
Hi,
Since you want to quit the thread after 3 seconds, why not use a QTimer also why quit the process like that ? You can use QThread::quit method to simply stop the QThread that is running.