Threads and gtk_timeout ?!



Hallo,

I have a question concerning threads and gtk_timeout.
My program is a client server system.
I have a server which calculates some data and  a visual client for the
visualization of this data.
Every one second the server sends the updated data to the visual client.

The visual client shows the data in 20 fps.
Now my problem:
In the visual client program I have a gtk_timeout every 0.05 seconds for
the refreshing of the display and so on...
Now I want a second thread for recieving the data from the server and
updating the viewed data.
This thread should update (write in a data array) the data which the
visual routine draws every 0.05 seconds to the screen. The visual
routine reads only from the data array.
Is this possible and how can I realize this ? Creates the gtk_timeout an
own thread every call or not ?
Have I to create 2 threads (one for the recieving routine and one for
the call of the gtk_timeout) ????????
And how do I generally use threads with gtk or gdk ??? I am a beginner
in using threads...

Many thanx
Arndt



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