Ryujinx-GtkSharp/glib
Rickard Edström 8e07e7d225 Add a SynchronizationContext implementation for GLib (bnc#621444)
Create a GLibSynchronizationContext that sends code to be run on the
GLib main loop, and set it as the current SynchronizationContext in
Gtk.Init().

When you use the await keyword to do a task asynchronously, by default
the awaiter will capture the current SynchronizationContext, and if
there was one, when the task completes it’ll Post the supplied
continuation back to that context, rather than running it on whatever
thread it wants.

This means that if you use the async/await keywords in your Gtk# app,
things will now work as expected with the GTK main thread. For example:

static async void DoWork () // called in the GTK main thread
{
    // Do some stuff with the UI...
    label.Text = "Starting Work";

    // Run something asynchronously, UI is not frozen
    int res = await DoLongOperation ();

    // Do some more UI stuff, it'll run on the GTK main thread
    label.Text = "Work done";
}

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
2012-11-08 22:33:46 +01:00
..
.gitignore Flatten the bootstrap and remove glade-sharp 2010-11-21 21:18:06 -06:00
Argv.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
ConnectBeforeAttribute.cs 2004-06-25 Mike Kestner <mkestner@ximian.com> 2004-06-25 18:42:19 +00:00
DefaultSignalHandlerAttribute.cs 2004-06-25 Mike Kestner <mkestner@ximian.com> 2004-06-25 18:42:19 +00:00
DestroyNotify.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
ExceptionManager.cs 2007-03-08 Mike Kestner <mkestner@novell.com> 2007-03-08 20:28:24 +00:00
FileUtils.cs 2009-11-30 Mike Kestner <mkestner@novell.com> 2009-11-30 17:39:11 +00:00
GException.cs 2009-11-28 Mike Kestner <mkestner@novell.com> 2009-11-28 18:42:36 +00:00
GInterfaceAdapter.cs Mark calling convention on GInterface callbacks 2011-07-24 18:29:04 -05:00
GInterfaceAttribute.cs 2007-09-11 Mike Kestner <mkestner@novell.com> 2007-09-11 20:34:24 +00:00
glib-api.xml GKeyFile binding 2011-04-14 14:35:47 -05:00
glib-sharp-3.0.pc.in 2009-08-30 Christian Hoff <christian_hoff@gmx.net> 2009-08-30 20:06:33 +00:00
glib-sharp.dll.config.in 2004-04-29 Mike Kestner <mkestner@ximian.com> 2004-04-29 15:00:24 +00:00
glib.csproj Add a SynchronizationContext implementation for GLib (bnc#621444) 2012-11-08 22:33:46 +01:00
GLibSynchronizationContext.cs Add a SynchronizationContext implementation for GLib (bnc#621444) 2012-11-08 22:33:46 +01:00
Global.cs Don't release const strings in GLib.Global. 2012-04-21 17:38:10 -05:00
GString.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
GType.cs glib: Use dictionaries to store type information in GType class 2012-11-04 16:58:49 +01:00
GTypeAttribute.cs * parser/gapi2xml.pl: make note of _get_type methods for enums 2005-05-04 16:54:24 +00:00
Idle.cs Remove source delegates by id. 2011-10-13 05:23:39 -05:00
InitiallyUnowned.cs Handle floating refs in InitiallyUnowned 2011-06-11 19:08:21 +02:00
IOChannel.cs 2009-11-30 Mike Kestner <mkestner@novell.com> 2009-11-30 17:39:11 +00:00
IWrapper.cs 2004-06-25 Mike Kestner <mkestner@ximian.com> 2004-06-25 18:42:19 +00:00
KeyFile.cs GKeyFile binding 2011-04-14 14:35:47 -05:00
List.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
ListBase.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
Log.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
MainContext.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
MainLoop.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
Makefile.am Add a SynchronizationContext implementation for GLib (bnc#621444) 2012-11-08 22:33:46 +01:00
ManagedValue.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
Markup.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
Marshaller.cs glib: Switch to generic collections in Marshaller and ValueArray 2012-11-04 16:58:49 +01:00
MissingIntPtrCtorException.cs 2004-06-25 Mike Kestner <mkestner@ximian.com> 2004-06-25 18:42:19 +00:00
NotifyHandler.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
Object.cs glib: add missing lock statements for Objects collection 2012-10-13 15:54:50 +02:00
ObjectManager.cs Improve MissingCtorException message. 2012-03-28 22:10:47 -05:00
Opaque.cs Remove obsolete and broken code from Opaque. 2011-02-10 21:16:05 -06:00
ParamSpec.cs ParamSpec: Add override modifier to the ToString method 2011-12-03 16:41:21 +01:00
Priority.cs 2009-05-03 Stephane Delcroix <sdelcroix@novell.com> 2009-05-03 19:34:22 +00:00
PropertyAttribute.cs 2008-06-06 Mike Kestner <mkestner@novell.com> 2008-06-06 16:55:00 +00:00
PtrArray.cs Some warning fixage. 2011-03-24 18:32:54 -05:00
Signal.cs Simplified Signal handling 2011-03-24 18:33:24 -05:00
SignalArgs.cs 2004-06-25 Mike Kestner <mkestner@ximian.com> 2004-06-25 18:42:19 +00:00
SignalAttribute.cs 2005-10-08 Ben Maurer <bmaurer@ximian.com> 2005-10-08 21:08:04 +00:00
SignalClosure.cs Some warning fixage. 2011-03-24 18:32:54 -05:00
SList.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
Source.cs 2009-09-03 Christian Hoff <christian_hoff@gmx.net> 2009-09-03 19:50:53 +00:00
Spawn.cs 2009-11-30 Mike Kestner <mkestner@novell.com> 2009-11-30 17:39:11 +00:00
Thread.cs glib: do not call g_thread_ functions in GLib >= 2.31 2012-05-03 23:45:07 +01:00
Timeout.cs Remove source delegates by id. 2011-10-13 05:23:39 -05:00
ToggleRef.cs Improve ToggleRef release overhead. 2011-07-29 13:37:39 -05:00
TypeFundamentals.cs remove a bunch of doc comments 2004-07-09 15:25:39 +00:00
TypeInitializerAttribute.cs 2007-09-06 Mike Kestner <mkestner@novell.com> 2007-09-07 14:40:46 +00:00
Value.cs * glib/Value.cs: revert to "working" GValue layout from 2-12 branch. 2011-04-27 19:05:11 -05:00
ValueArray.cs glib: Switch to generic collections in Marshaller and ValueArray 2012-11-04 16:58:49 +01:00
Variant.cs Initial support for GVariant 2011-01-22 12:52:38 -06:00
VariantType.cs Implement GVariantType binding. 2011-02-11 13:52:13 -06:00