Re: Event loop hangup when using TimeoutSource and IdleSource



On Thu, 24 Sep 2009 17:02:00 -0400
Jim Hodapp <james hodapp gmail com> wrote:
>      I am sure that the library does not touch GTK+ functions. It's
> a C library and the only thing that touches the GUI is the GUI app  
> itself and that's only via C++ and gtkmm. The library does no output  
> other than to stderr. The library calls only get called one at a
> time. The only thing that is *parallel* is the loop in the library
> that is in a separate thread that calls select() to see if there's
> anything on the serial port to read, and checks the message queues to
> see if any commands need to go out to the device. I have the function
> that adds a new command to the message queue protected with a mutex
> just in case I ever have a GUI frontend that is multithreaded.

Jim,

I cannot quite reconcile your "adding things to the message queue" on
the one hand (dangerous) particularly with your reference to doing
so under an (unnecessary) lock, with "the library does no output other
than to stderr" on the other (safe), but you obviously know what you
are doing.

I am out of suggestions I am afraid.

Chris




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