Using MyGUI in a multithreaded application


09-08-2011 05:30:27

I'm using MyGUI in a multithreaded application, and it randomly caused crashes/lockups. So I then used mutexes; one around drawOneFrame, and others around the threaded functions. That still didn't work as expected, as the application still randomly crashed/locked up. I then tried to use critical sections, and it still has not worked...

Is there any way possible that MyGUI can work in a multithreaded application? I'm really frustrated because MyGUI isnt thread safe... It really should be...

Thanks for any help,


09-08-2011 09:59:57

I used MyGUI in some multithread applications. In most cases it wasn't hard to use GUI related code only from thread where render is, so it wasn't necessary to use critical sections. In other cases I used delayed GUI related stuff with mutexes - writing actions in queue and then perform them in frameStarted event from thread where rendering is.


09-08-2011 18:29:46

Could you share some examples of using MyGUI in a multithreaded application? Or at least let me know if what I was doing was the correct approach? As I said before I am calling drawOneFrame within the mutex, and calling the MyGUI functions from within the thread inside a mutex. Is this correct?