ORBit2 r2106 - in trunk: . linc2 linc2/src



Author: tml
Date: Mon Jan  5 15:52:29 2009
New Revision: 2106
URL: http://svn.gnome.org/viewvc/ORBit2?rev=2106&view=rev

Log:
2009-01-05  Tor Lillqvist  <tml novell com>

	Bug 547885 - ORBit2 should not call g_thread_init() itself as it
	is usually too late

	* src/linc.c (link_init): Revert change below. Do call
	g_thread_init(). We don't care what the GLib documentation
	says. If this potentially late call of g_thread_init() causes
	problems on some non-Linux platforms, that is the
	problem of whoever is porting or writing code for that platform,
	and they need to make sure they call g_thread_init(NULL) very
	early. Hooray for code working by accident!



Modified:
   trunk/ChangeLog
   trunk/linc2/ChangeLog
   trunk/linc2/src/linc.c

Modified: trunk/linc2/src/linc.c
==============================================================================
--- trunk/linc2/src/linc.c	(original)
+++ trunk/linc2/src/linc.c	Mon Jan  5 15:52:29 2009
@@ -197,15 +197,7 @@
 #endif
 
 	if (thread_safe && !g_thread_supported ())
-		g_warning ("g_thread_init() has not been called. "
-			   "ORBit2 would like to use threads, so the application "
-			   "should have called g_thread_init(NULL) before any "
-			   "GLib or GLib-using API. "
-			   "Calling g_thread_init() now here "
-			   "inside the libORBit-2 library is too late, "
-			   "so instead threads won't be used by ORBit2. "
-			   "This might have bad side-effects. "
-			   "Fix the application!");
+		g_thread_init (NULL);
 
 	link_is_thread_safe = (thread_safe && g_thread_supported());
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]