Re: Help: multithreaded GNOME app
- From: Jason Tackaberry <tack dok org>
- To: "Marc J. Fraioli" <fraioli dg-rtp dg com>, Roland Dreier <droland mail math okstate edu>
- Cc: gnome-list gnome org
- Subject: Re: Help: multithreaded GNOME app
- Date: Mon, 1 Feb 1999 18:26:02 -0500
> The GTK thread (by which I assume you mean the thread that calls
> gtk_main()) shouldn't ever block anywhere but inside of gtk_main(). If
> you call pthread_cond_wait() from that thread somewhere, then it won't
Yup, that is definitely not a working solution. :)
> I think the basic strategy to follow is the one he is already
> following; the GTK thread has one end of a pipe multiplexed in with the
> other things it listens for in gtk_main(). The other thread or threads
> send it notifications on that pipe, which indicate that it should look
I think that's the best way to go about it too. (Thanks Jeff.) I'll pass
a pointer to the data structure that's to be processed, instead of keeping
a separate queue. (The pipe will be the queue for me.)
It never ceases to amaze me that after an hour of asking a question I can
have 20 intelligent replies and have the problem pretty much solved. :)
Thanks everyone,
Jason.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]