Cause I think deleting a QThread while executing is dangerous, isn't it?
If I don't finish the threading properly the app chrashes.
if(worker){//thats the pointer that is checked
worker->interrupt();//a custom method that finishes the run method in object Worker, which is moved to QThread
thread->quit();
if(!thread->wait(3000))
{
thread->terminate();
thread->wait();
}
}
if(worker){//thats the pointer that is checked
worker->interrupt();//a custom method that finishes the run method in object Worker, which is moved to QThread
thread->quit();
if(!thread->wait(3000))
{
thread->terminate();
thread->wait();
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks