Re: Help: multithreaded GNOME app



On Mon, 1 Feb 1999 15:33:38 -0500, Jason Tackaberry <tack@dok.org> wrote:
>I'm writing a gnome app that uses threads.  I am assuming gtk+ and gnome-libs
>aren't thread safe

gnome-libs isn't explicitly thread-safe (you'll have to lock your own data
structures). However, gtk+ has the gdk_threads_enter() and
gdk_threads_leave() stuff for a sort of synchronization between threads.

>I was thinking of using a file handle as the sort of communication-between-
>threads mechanism that I need to do.  Thread A can monitor some file handle
>fd.  When fd has data, it knows there is a request to do a draw, and this
>will happen immediately.  But I'm asking if there is a more elegant way
>to do this?  Maybe some thread message passing functions?

semaphores.

-- Elliot
"In film you will find four basic story lines. Man versus man, man
 versus nature, nature versus nature, and dog versus vampire."
    - Steven Spielberg



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