Re: Idle Function Not Getting Called

2009-09-13 Thread Chris Vine
On Sat, 12 Sep 2009 17:46:17 -0400 (EDT)
Marshall Lake ml...@mlake.net wrote:
  The important point in looking at out-of-order locking (or other 
  locking issues) is that the idle handler runs in the thread in
  which the main program loop runs, not the thread which called
  g_idle_add()/ g_idle_add_full(), and that it runs at a time not
  of that calling thread's choosing.
 
  I don't quite understand this.  Don't all idle functions run in
  the main program loop thread?
 
  Yes.
 
 Then I don't understand what you mean by the idle handler runs in
 the thread in which the main program loop runs, not the thread which
 called g_idle_add()/g_idle_add_full().
 
 Maybe I don't know what idle handler is but isn't that a moot point 
 since the idle function (handler?) always runs in the main program
 loop thread?
 
Perhaps we speak slightly different versions of English, but I was
merely alerting you to the fact that the idle callback runs in the main
program loop, in case you didn't realise that. Clearly you do, which
is fine.

Incidentally, to see if you have recursive locking have you tried
recursive mutexes to see if that exhibits the same problem or not?  If
they don't your search is narrowed considerably.

Chris


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Idle Function Not Getting Called

2009-09-13 Thread Marshall Lake


The important point in looking at out-of-order locking (or other 
locking issues) is that the idle handler runs in the thread in which 
the main program loop runs, not the thread which called 
g_idle_add()/ g_idle_add_full(), and that it runs at a time not of 
that calling thread's choosing.


Incidentally, to see if you have recursive locking have you tried 
recursive mutexes to see if that exhibits the same problem or not?  If 
they don't your search is narrowed considerably.


I've taken some time to check the mutex and locks/unlocks between the 
secondary thread and the idle function.  All appear as it should.  The 
locks/unlocks are being applied in an orderly fashion and as they should 
be, and there are no recursive locks.  The program flows as it should.


I still feel my problem has something to do with the secondary thread and 
idle function working together but at this point I'm not sure what to 
check next.


--
Marshall Lake -- ml...@mlake.net -- http://mlake.net
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list