+Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
+
+ * tests/mainloop-test.c (recurser_idle): Recurse
+ with may_block = FALSE, so we don't get into
+ the pathology where the recurser_idle recurses
+ for 10 iterations, and the only thing that is
+ running is the recurser idle, which adds
+ another recursion for each of those 10 iterations
+ and....
+
+ * tests/mainloop-test.c (create_crawler): Fix race
+ condition where a crawler source could be destroyed
+ before it was added to the crawler array.
+
+ * test/Makefile.am: Add mainloop-test back.
+
2001-11-01 Marius Andreiana <mandreiana@yahoo.com>
* configure.in: Added ro (Romanian) to ALL_LINGUAS
+Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
+
+ * tests/mainloop-test.c (recurser_idle): Recurse
+ with may_block = FALSE, so we don't get into
+ the pathology where the recurser_idle recurses
+ for 10 iterations, and the only thing that is
+ running is the recurser idle, which adds
+ another recursion for each of those 10 iterations
+ and....
+
+ * tests/mainloop-test.c (create_crawler): Fix race
+ condition where a crawler source could be destroyed
+ before it was added to the crawler array.
+
+ * test/Makefile.am: Add mainloop-test back.
+
2001-11-01 Marius Andreiana <mandreiana@yahoo.com>
* configure.in: Added ro (Romanian) to ALL_LINGUAS
+Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
+
+ * tests/mainloop-test.c (recurser_idle): Recurse
+ with may_block = FALSE, so we don't get into
+ the pathology where the recurser_idle recurses
+ for 10 iterations, and the only thing that is
+ running is the recurser idle, which adds
+ another recursion for each of those 10 iterations
+ and....
+
+ * tests/mainloop-test.c (create_crawler): Fix race
+ condition where a crawler source could be destroyed
+ before it was added to the crawler array.
+
+ * test/Makefile.am: Add mainloop-test back.
+
2001-11-01 Marius Andreiana <mandreiana@yahoo.com>
* configure.in: Added ro (Romanian) to ALL_LINGUAS
+Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
+
+ * tests/mainloop-test.c (recurser_idle): Recurse
+ with may_block = FALSE, so we don't get into
+ the pathology where the recurser_idle recurses
+ for 10 iterations, and the only thing that is
+ running is the recurser idle, which adds
+ another recursion for each of those 10 iterations
+ and....
+
+ * tests/mainloop-test.c (create_crawler): Fix race
+ condition where a crawler source could be destroyed
+ before it was added to the crawler array.
+
+ * test/Makefile.am: Add mainloop-test back.
+
2001-11-01 Marius Andreiana <mandreiana@yahoo.com>
* configure.in: Added ro (Romanian) to ALL_LINGUAS
+Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
+
+ * tests/mainloop-test.c (recurser_idle): Recurse
+ with may_block = FALSE, so we don't get into
+ the pathology where the recurser_idle recurses
+ for 10 iterations, and the only thing that is
+ running is the recurser idle, which adds
+ another recursion for each of those 10 iterations
+ and....
+
+ * tests/mainloop-test.c (create_crawler): Fix race
+ condition where a crawler source could be destroyed
+ before it was added to the crawler array.
+
+ * test/Makefile.am: Add mainloop-test back.
+
2001-11-01 Marius Andreiana <mandreiana@yahoo.com>
* configure.in: Added ro (Romanian) to ALL_LINGUAS
+Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
+
+ * tests/mainloop-test.c (recurser_idle): Recurse
+ with may_block = FALSE, so we don't get into
+ the pathology where the recurser_idle recurses
+ for 10 iterations, and the only thing that is
+ running is the recurser idle, which adds
+ another recursion for each of those 10 iterations
+ and....
+
+ * tests/mainloop-test.c (create_crawler): Fix race
+ condition where a crawler source could be destroyed
+ before it was added to the crawler array.
+
+ * test/Makefile.am: Add mainloop-test back.
+
2001-11-01 Marius Andreiana <mandreiana@yahoo.com>
* configure.in: Added ro (Romanian) to ALL_LINGUAS
+Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
+
+ * tests/mainloop-test.c (recurser_idle): Recurse
+ with may_block = FALSE, so we don't get into
+ the pathology where the recurser_idle recurses
+ for 10 iterations, and the only thing that is
+ running is the recurser idle, which adds
+ another recursion for each of those 10 iterations
+ and....
+
+ * tests/mainloop-test.c (create_crawler): Fix race
+ condition where a crawler source could be destroyed
+ before it was added to the crawler array.
+
+ * test/Makefile.am: Add mainloop-test back.
+
2001-11-01 Marius Andreiana <mandreiana@yahoo.com>
* configure.in: Added ro (Romanian) to ALL_LINGUAS
+Thu Nov 1 21:48:43 2001 Owen Taylor <otaylor@redhat.com>
+
+ * tests/mainloop-test.c (recurser_idle): Recurse
+ with may_block = FALSE, so we don't get into
+ the pathology where the recurser_idle recurses
+ for 10 iterations, and the only thing that is
+ running is the recurser idle, which adds
+ another recursion for each of those 10 iterations
+ and....
+
+ * tests/mainloop-test.c (create_crawler): Fix race
+ condition where a crawler source could be destroyed
+ before it was added to the crawler array.
+
+ * test/Makefile.am: Add mainloop-test back.
+
2001-11-01 Marius Andreiana <mandreiana@yahoo.com>
* configure.in: Added ro (Romanian) to ALL_LINGUAS
hash-test \
iochannel-test \
list-test \
+ mainloop-test \
module-test \
node-test \
queue-test \
hash_test_LDADD = $(progs_LDADD)
iochannel_test_LDADD = $(progs_LDADD)
list_test_LDADD = $(progs_LDADD)
-#mainloop_test_LDADD = $(thread_LDADD)
+mainloop_test_LDADD = $(thread_LDADD)
markup_test_LDADD = $(progs_LDADD)
module_test_LDADD = $(module_LDADD)
module_test_LDFLAGS = @G_MODULE_LDFLAGS@
#define CRAWLER_TIMEOUT_RANGE 40
#define RECURSER_TIMEOUT 50
+/* The partial ordering between the context array mutex and
+ * crawler array mutex is that the crawler array mutex cannot
+ * be locked while the context array mutex is locked
+ */
GPtrArray *context_array;
GMutex *context_array_mutex;
GCond *context_array_cond;
GSource *source = g_timeout_source_new (g_random_int_range (0, CRAWLER_TIMEOUT_RANGE));
g_source_set_callback (source, (GSourceFunc)crawler_callback, source, NULL);
+ G_LOCK (crawler_array_lock);
+ g_ptr_array_add (crawler_array, source);
+
g_mutex_lock (context_array_mutex);
g_source_attach (source, context_array->pdata[g_random_int_range (0, context_array->len)]);
g_source_unref (source);
g_mutex_unlock (context_array_mutex);
- G_LOCK (crawler_array_lock);
- g_ptr_array_add (crawler_array, source);
G_UNLOCK (crawler_array_lock);
}
gint i;
for (i = 0; i < 10; i++)
- g_main_context_iteration (context, TRUE);
+ g_main_context_iteration (context, FALSE);
return FALSE;
}