c++ - Deadlock - Creating a QThread from the main thread -
c++ - Deadlock - Creating a QThread from the main thread -
i trying debug situation 2 threads have been locked on same mutex(qmutex). connection between 2 threads -one thread created another. i.e. first main thread( gui thread) , create object of user defined class. constructor of object new thread created. wrong usage ?
//some part of code: void main() { mymainthread *obj = new mymainthread(); // class inherits qwidget } //this class declaration in file class someobj { someobj() { } startanotherobjthread() { anotherobjthread obj = new anotherobjthread(this); obj->start(); } } mymainthread() { someobj *obj = new someobj(); obj->startanotherobjthread(); }
c++ linux qt qt4
Comments
Post a Comment