Sponsored Content
Top Forums Programming GTK C development; question/concern wrt gtk_dialog_run Post 302564470 by Corona688 on Thursday 13th of October 2011 06:23:14 PM
Old 10-13-2011
I think you're overthinking this. This isn't pretend-multithreading with longjmp, this is just ordinary event-based programming. gtk has a big list of timers and things receiving events. It waits for events or timeouts and calls the necessary callbacks when they happen. Things like gtk_main_quit() just alter variables inside the GTK event loop.

You make lots of GTK calls inside area_event, too. Anything in there could be checking the timer. No longjmp() trickery necessary.

It's not multithreaded by design. Data visibility isn't a problem inside one thread, there's no race conditions and no magic things to be done to let other callbacks see your own changes.

If you're worried about things deadlocking inside GTK, you may be wanting to do things which probably shouldn't be inside the GTK loop. Keep a work thread that does no GTK stuff at all and let GTK do its own thing.
 
libgailutil.3(3)                                         Introduction to Library Functions                                        libgailutil.3(3)

NAME
libgailutil - GTK+ Accessibility Implementation Library Utilities DESCRIPTION
The libgailutil library provides useful accessibility functions that are common to many GTK+ components. These functions are used when implementing accessibility support for a customized GTK+ based component. To access the API documentation, you must install the developer version of the package. FILES
The following files are used by this application: /usr/lib/libgailutil.so GTK+ Accessibility shared library /usr/share/gtk-doc/html Location of developer documentation ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-libs | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
libatk-1.0(3), libgtk-x11-2.0(3) NOTES
Written by Brian Cameron, Sun Microsystems Inc., 2003, 2004. SunOS 5.10 31 Aug 2004 libgailutil.3(3)
All times are GMT -4. The time now is 10:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy