Index: gobject/gobject.c
===================================================================
--- gobject/gobject.c	(revision 5707)
+++ gobject/gobject.c	(working copy)
@@ -66,6 +66,7 @@
 static void	g_object_base_class_init		(GObjectClass	*class);
 static void	g_object_base_class_finalize		(GObjectClass	*class);
 static void	g_object_do_class_init			(GObjectClass	*class);
+static void	ensure_pspec_pool			(void);
 static void	g_object_init				(GObject	*object);
 static GObject*	g_object_constructor			(GType                  type,
 							 guint                  n_construct_properties,
@@ -253,7 +254,7 @@
 
   quark_weak_refs = g_quark_from_static_string ("GObject-weak-references");
   quark_toggle_refs = g_quark_from_static_string ("GObject-toggle-references");
-  pspec_pool = g_param_spec_pool_new (TRUE);
+  ensure_pspec_pool ();
   property_notify_context.quark_notify_queue = g_quark_from_static_string ("GObject-notify-queue");
   property_notify_context.dispatcher = g_object_notify_dispatcher;
   
@@ -282,6 +283,20 @@
 }
 
 static void
+ensure_pspec_pool (void)
+{
+  G_LOCK_DEFINE_STATIC (pspec_pool_mutex);
+
+  if (G_LIKELY (pspec_pool))
+    return;
+
+  G_LOCK (pspec_pool_mutex);
+  if (!pspec_pool)
+    pspec_pool = g_param_spec_pool_new (TRUE);
+  G_UNLOCK (pspec_pool_mutex);
+}
+
+static void
 install_property_internal (GType       g_type,
 			   guint       property_id,
 			   GParamSpec *pspec)
@@ -342,6 +357,7 @@
   g_return_if_fail (!G_IS_PARAM_SPEC_OVERRIDE (pspec)); /* paranoid */
   g_return_if_fail (PARAM_SPEC_PARAM_ID (pspec) == 0);	/* paranoid */
 		    
+  ensure_pspec_pool ();
   install_property_internal (iface_class->g_type, 0, pspec);
 }
 
@@ -380,6 +396,7 @@
   g_return_val_if_fail (G_TYPE_IS_INTERFACE (iface_class->g_type), NULL);
   g_return_val_if_fail (property_name != NULL, NULL);
   
+  ensure_pspec_pool ();
   return g_param_spec_pool_lookup (pspec_pool,
 				   property_name,
 				   iface_class->g_type,
@@ -465,6 +482,7 @@
 
   g_return_val_if_fail (G_TYPE_IS_INTERFACE (iface_class->g_type), NULL);
 
+  ensure_pspec_pool ();
   pspecs = g_param_spec_pool_list (pspec_pool,
 				   iface_class->g_type,
 				   &n);
