[clutter/msvc-support-master] Bug 662071-[Win32]-Don't init the Big Clutter Lock
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/msvc-support-master] Bug 662071-[Win32]-Don't init the Big Clutter Lock
- Date: Mon, 24 Oct 2011 16:14:09 +0000 (UTC)
commit 7c6038d77b0d0b3323867f8a881d72ca37bb8b7c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Oct 25 00:13:53 2011 +0800
Bug 662071-[Win32]-Don't init the Big Clutter Lock
Since the Windows GUI system is assuming multithreadedness, initializing
locks after entering the GUI portion on Windows is likely to cause
problems[1][2], which results many Clutter programs to crash due to
releasing resources that they did not own.
[1]: Multi-threaded use of GTK+ on Win32 in README.win32 of GTK+
source package
[2]: Explanation of Windows GUI system regarding its multithreadness
assumptions-
http://mail.gnome.org/archives/gtk-list/2011-June/msg00005.html
clutter/clutter-main.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index 7d4d815..ff34bb0 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -215,11 +215,17 @@ clutter_threads_init_default (void)
{
g_mutex_init (&clutter_threads_mutex);
+#ifndef CLUTTER_WINDOWING_WIN32
+ /* we don't need nor want locking functions on Windows.here
+ * as Windows GUI system assumes multithreadedness
+ * see bug: https://bugzilla.gnome.org/show_bug.cgi?id=662071
+ */
if (clutter_threads_lock == NULL)
clutter_threads_lock = clutter_threads_impl_lock;
if (clutter_threads_unlock == NULL)
clutter_threads_unlock = clutter_threads_impl_unlock;
+#endif /* CLUTTER_WINDOWING_WIN32 */
}
#define ENVIRONMENT_GROUP "Environment"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]