Merge pull request #87 from knocte/guithreadcheck_fflush
gui-thread-check: use fflush() after printf()
This commit is contained in:
commit
68c64bedc0
1 changed files with 4 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <mono/metadata/profiler.h>
|
#include <mono/metadata/profiler.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
extern pthread_t pthread_self (void);
|
extern pthread_t pthread_self (void);
|
||||||
|
@ -63,6 +64,7 @@ simple_method_enter (MonoProfiler *prof, MonoMethod *method)
|
||||||
guithread_set = TRUE;
|
guithread_set = TRUE;
|
||||||
guithread = current_thread_id;
|
guithread = current_thread_id;
|
||||||
printf ("*** GUI THREAD INITIALIZED: %u\n", guithread);
|
printf ("*** GUI THREAD INITIALIZED: %u\n", guithread);
|
||||||
|
fflush (NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!guithread_set) {
|
if (!guithread_set) {
|
||||||
|
@ -77,6 +79,7 @@ simple_method_enter (MonoProfiler *prof, MonoMethod *method)
|
||||||
) {
|
) {
|
||||||
printf ("*** GTK CALL NOT IN GUI THREAD: %s.%s\n", klass_name, method_name);
|
printf ("*** GTK CALL NOT IN GUI THREAD: %s.%s\n", klass_name, method_name);
|
||||||
mono_stack_walk_no_il (stack_walk_fn, NULL);
|
mono_stack_walk_no_il (stack_walk_fn, NULL);
|
||||||
|
fflush (NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue