Re: [gtk-vnc-devel] [Q] gvncviewer with gthread
- From: Anthony Liguori <anthony codemonkey ws>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: gtk-vnc-devel lists sourceforge net
- Subject: Re: [gtk-vnc-devel] [Q] gvncviewer with gthread
- Date: Wed, 06 Feb 2008 18:53:44 -0600
Daniel P. Berrange wrote:
On Mon, Feb 04, 2008 at 09:52:28PM -0600, Anthony Liguori wrote:
It looks like it's an issue with gtk_dialog_run(). This function enters
a recursive main loop which is a generally unsafe thing to do in gtk.
It's unfortunately really that it does this.
It may be that we need to issue signals from the system coroutine
instead of the vnc coroutine. The vnc coroutine is running a separate
thread and I'm pretty sure that will confuse gtk greatly. I'll look
into it.
Raising signals from other threads is no trouble - *providing* that
the app has called the gtk_init_threads(), and in their signal handler
*must* grab the GTK thread lock before doing anything. Of course apps
aren't supposed to know that gvnc is using threads, so perhaps we do need
to take care to raise the signal from the main coroutine. I've thought
about this before and its not too pleasant :-(
I spent some time looking into this, from what I've read, the main loop
must always be executed from the main thread. AFAICT, this means we
have to emit signals from the same thread that create the VncDisplay
object to avoid confusing applications.
Does that seem true?
Regards,
Anthony Liguori
Dan.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]