Re: threads and Sockets



On Wed, Apr 25, 2001 at 10:19:38PM +0200, G Hasse wrote:
On Wed, 25 Apr 2001, Oliver Buecker wrote:

Hello alltogether,
- is it possible that someone kann give me an example how
    make threads with gtk????

Basicaly you don't want to do threads in a UI application.

Why not? GTK+ is thread safe. See question 5.2 in the GTK+ FAQ at
http://www.gtk.org/faq/ .

If you want to do many things "at the same time" do them
in separate servers and create sockets between them.
Then you listen on the socket with

gdk_input_add( s, GDK_INPUT_READ, GTK_SIGNAL_FUNC(file_function),
&cmdinfo );

To read from the socket when data is available.

That's another way to do it, yes. But standard POSIX threads works as
well.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J A K Mouw its tudelft nl
WWW: http://www-ict.its.tudelft.nl/~erik/




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