Re: Corba & MultiThreading




Philip Dawes <philipd@parallax.co.uk> writes:

> Owen Taylor wrote:
> > 
> > If you need actual non-blocking behavior, you can get it with
> > 
> > while (gtk_events_pending ())
> >   gtk_main_iteration();
> > 
> > (Note, gtk_events_pending, not gdk_events_pending - using that
> > _will_ cause shaky behavior)
> > 
> > I won't guarantee that there are absolutely no bugs, but if you
> > find any, we'll fix them.
> > 
> 
> Are you 100% sure (i.e. have you tried this). I seem to remember that
> gtk_main_iteration() still blocks.

Well, Alan Cox used it for Gnoom, and it apparently works
OK with that. There might be a need for an actual non-blocking
main loop (somebody made a start of it with gtk_main_iteration_do()
but that doesn't work now). However, the only thing that would save,
as far as I can see, would be a single call to XPending() for
each event read from the queue. 

Functionally, the above should work the same. You can also make
sure that gtk_main_iteration doesn't block by setting up an
empty idle handler.

I don't think this is relevant for an ORB in any case. It should
_not_ be sitting on the CPU like that.

Regards,
                                        Owen




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