run two thread or two code line in same time
Hi I have create two thread classes :
Then in main class I have create two object from above thread classes like below :
qprocessThread mythread; qprocessThreadTwo mythreadtwo;
My question is that, how can run two code line below in the same time or synchronize ?
I want to both of lines, run or start in the same time. How can I do this???
You need to call start() method of both the thread object. There is nothing like both at same time. start() call has to be one after the other from calling/main thread.
@Alexanov You should learn how multi-threading works: http://doc.qt.io/qt-5/thread-basics.html