Re: Handling Unix signals in a GTK+ application
- From: "Freddie Unpenstein" <fredderic excite com>
 
- To: tristan van berkom gmail com, yeti physics muni cz
 
- Cc: gtk-app-devel-list gnome org
 
- Subject: Re: Handling Unix signals in a GTK+ application
 
- Date: Fri, 17 Mar 2006 05:18:08 -0500 (EST)
 
You are absolutely right; mutexes /are/ useless from signal
handlers. It seems the only reasonable way is to use a pipe().
How about GAsyncQueue's?  They're supposed to be thread safe without the need of locking...  How about within 
a single thread?
Add a unix signal number in the signal handler, and suck it out again in a custom event source's prepare 
method.  The prepare method can return -1 for its timeout contribution, and true/false if there's something 
in the queue.
Fredderic
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]