| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 8 | |
<<< text/html: EXCLUDED >>>
I'm not friendly about a 'handle', so assume it means 'a pointer to a poiner'. Perhaps you have to use a mutex for atomic access, not only for the 'handle' value, but also handle'ed object itself, to avoid deleting a object which some other thread may be working with. As a result, multithread advantage would be spoiled. So using a mutex is required but may be not enough. Naoyuki On 2002 March 21 Thursday 18:33, Olivier RIFFAUD wrote: > I have 3 widgets who have a handle on (B?(B class A , and > when i delete A and create a new A, after put the hadle > to NULL one the widget, and set the handle after the new > A, i have crah with QT with the mouse event or redraw ( > updateGL ). Does i have to make a mutex ?? it is because > the event loop is parallele to my code an the event play > between the delete and the new A ??
Are you on X? Sounds like you have two threads trying to do stuff with the X server. Only one thread can talk to the X server. -Calin On Thu, 21 Mar 2002, Olivier RIFFAUD wrote: > Hello, > > I have 3 widgets who have a handle on à class A , and when i delete A and create a new A, after put the hadle to NULL one the widget, and set the handle after the new A, i have crah with QT with the mouse event or redraw ( updateGL ). > Does i have to make a mutex ?? it is because the event loop is parallele to my code an the event play between the delete and the new A ?? > > It is clear ?? > (i'm french) > >