Re: Stupid question regarding g_thread_init() and gtk_threads_init()



>> Well, perhaps the reason is simply that gdk_threads_init() is so
>> rarely used since it is in general a bad idea to have multiple threads
>> access the user interface.
>
>I've got an application that is fed data asynchronously independant of user
>intervention to display real time data.  I'm well versed in embedded
>programming and am comfortable with dealing with race conditions.  Threads
>are very useful, if you know how to exploit them.  In my world (at least)
>the "proper" way to do two tasks which are completely independant of the
>other except that they share data is to use two threads.

Precisely. Handling a data feed and managing a GUI are completely
independent tasks. And since one of your threads is handling a data
feed, and one of them is managing the GUI, your philosophy takes you
precisely where the initial paragraph had already been.



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