Re: [gtkmm] Need advise



>Is it really true that you _have_ to have one thread touching the
>gtkmm-functions? At least with gtk+ you can update the gui from multiple
>threads if you use gdk_threads_enter()/leave(), I have done so successfully
>in a few projects. However, it might be easier to do all gui-related work in
>the main thread, but I really wonder if it really is a requirement?

its not a requirement. you can use the locking technique if you
want. but most people to date who have worked on more-than-toy
projects have found it simpler to force all GUI code to run in a
single thread. during the development process, the locking technique
can result in timing/deadlock problems that are much more complex to
solve because they cross thread boundaries. otoh, the single thread
technique can lead to ugly corruption problems if you forget to obey
it (this has been one of my most common and nasty errors in my current
(4-1/2 year long) project.

so, you pays (no) money and you takes your choice.

--p




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]