예제 #1
0
		internal static void Initialize ()
		{
			if (guiContext != null)
				return;
			
			guiContext = new GuiSyncContext ();

			SynchronizationContext = new GtkSynchronizationContext ();
		}
		internal static void Initialize ()
		{
			if (guiContext != null)
				return;
			
			guiContext = new GuiSyncContext ();
			guiThread = Thread.CurrentThread;
			
			handler = new GLib.TimeoutHandler (guiDispatcher);
			
			thrBackground = new Thread (new ThreadStart (backgroundDispatcher)) {
				Name = "Background dispatcher",
				IsBackground = true,
				Priority = ThreadPriority.Lowest,
			};
			thrBackground.Start ();
			
			DispatchDebug = Environment.GetEnvironmentVariable ("MONODEVELOP_DISPATCH_DEBUG") != null;

			SynchronizationContext = new GtkSynchronizationContext ();
		}