Re: problems with synchronization of threads in updating a text buffer in gtk2.0



On 12/21/05, Suresh Stephen <stephenwalter_2k2 yahoo com> wrote:
 Hi all,
  I am working on developing a gui for my application which runs many posix threads. These threads will try 
to update the text view by adding text.

You shouldn't update the text view from a thread other than the main
GUI thread.  Your UI is not thread safe.  You should have your threads
processing information and when data is ready to be displayed, you can
use g_idle_add() to call a function in the main thread that actually
prints it to your text view.

-D


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