mirror of
				https://github.com/Ryujinx/GtkSharp.git
				synced 2025-11-04 08:24:56 +00:00 
			
		
		
		
	gui-thread-check: Merge README with gtk-sharp's
This commit is contained in:
		
							parent
							
								
									0ed390b201
								
							
						
					
					
						commit
						d58243149d
					
				
							
								
								
									
										33
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								README
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -33,6 +33,39 @@ Building & Installing Gtk#:
 | 
			
		|||
    and will need to replace the configure above with autogen.sh.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The gui-thread-check profiler module.
 | 
			
		||||
-------------------------------------
 | 
			
		||||
 | 
			
		||||
    Since version 3 of gtk# a profiler called "gui-thread-check" is included as
 | 
			
		||||
    part of the install for debugging purposes. (It's located in the subfolder
 | 
			
		||||
    gtk/gui-thread-check .)
 | 
			
		||||
 | 
			
		||||
    This profiler module can be used to check if a GTK# application is trying to
 | 
			
		||||
    invoke gtk or gdk methods from a thread which is not the main GUI thread.
 | 
			
		||||
 | 
			
		||||
    To use it, run your application with the command:
 | 
			
		||||
 | 
			
		||||
        mono --profile=gui-thread-check yourapp.exe
 | 
			
		||||
 | 
			
		||||
    If the profiler is properly installed, you'll see an output like this:
 | 
			
		||||
 | 
			
		||||
        *** Running with gui-thread-check ***
 | 
			
		||||
        *** GUI THREAD INITIALIZED: 2861676352
 | 
			
		||||
 | 
			
		||||
    While the application is running, if the profiler detects a non-gui thread
 | 
			
		||||
    invoking gtk methods, it will print a warning message together with a
 | 
			
		||||
    stack trace. For example:
 | 
			
		||||
 | 
			
		||||
        *** GTK CALL NOT IN GUI THREAD: Widget.gtk_widget_get_parent
 | 
			
		||||
           Widget.get_Parent
 | 
			
		||||
           SourceEditorWidget.SetLastActiveEditor
 | 
			
		||||
           SourceEditorWidget.get_TextEditor
 | 
			
		||||
           SourceEditorWidget.get_Document
 | 
			
		||||
           SourceEditorWidget.HandleParseInformationUpdaterWorkerThreadDoWork
 | 
			
		||||
           BackgroundWorker.OnDoWork
 | 
			
		||||
           BackgroundWorker.ProcessWorker
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Discussion & Support:
 | 
			
		||||
---------------------
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,29 +0,0 @@
 | 
			
		|||
The gui-thread-check profile module
 | 
			
		||||
===================================
 | 
			
		||||
 | 
			
		||||
This profiler module can be used to check if a GTK# application is trying to
 | 
			
		||||
invoke gtk or gdk methods from a thread which is not the main GUI thread.
 | 
			
		||||
 | 
			
		||||
To use it, build and install the module, and then run your application with
 | 
			
		||||
the command:
 | 
			
		||||
 | 
			
		||||
  mono --profile=gui-thread-check yourapp.exe
 | 
			
		||||
 | 
			
		||||
If the profiler is properly installed, you'll see an output like this:
 | 
			
		||||
 | 
			
		||||
*** Running with gui-thread-check ***
 | 
			
		||||
*** GUI THREAD INITIALIZED: 2861676352
 | 
			
		||||
 | 
			
		||||
While the application is running, if the profiler detects a non-gui thread
 | 
			
		||||
invoking gtk methods, it will print a warning message together with a
 | 
			
		||||
stack trace. For example:
 | 
			
		||||
 | 
			
		||||
*** GTK CALL NOT IN GUI THREAD: Widget.gtk_widget_get_parent
 | 
			
		||||
   Widget.get_Parent
 | 
			
		||||
   SourceEditorWidget.SetLastActiveEditor
 | 
			
		||||
   SourceEditorWidget.get_TextEditor
 | 
			
		||||
   SourceEditorWidget.get_Document
 | 
			
		||||
   SourceEditorWidget.HandleParseInformationUpdaterWorkerThreadDoWork
 | 
			
		||||
   BackgroundWorker.OnDoWork
 | 
			
		||||
   BackgroundWorker.ProcessWorker
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in a new issue