Re: Help: multithreaded GNOME app



> 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]