brasero r1923 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1923 - in trunk: . src
- Date: Mon, 16 Feb 2009 16:56:57 +0000 (UTC)
Author: philippr
Date: Mon Feb 16 16:56:57 2009
New Revision: 1923
URL: http://svn.gnome.org/viewvc/brasero?rev=1923&view=rev
Log:
2009-02-16 Philippe Rouquier <ykw localhost localdomain>
Avoid blocking if a callback for a result enter a g_main_loop
* src/brasero-io.c (brasero_io_return_result_idle):
Modified:
trunk/ChangeLog
trunk/src/brasero-io.c
Modified: trunk/src/brasero-io.c
==============================================================================
--- trunk/src/brasero-io.c (original)
+++ trunk/src/brasero-io.c Mon Feb 16 16:56:57 2009
@@ -306,13 +306,17 @@
priv = BRASERO_IO_PRIVATE (self);
+ g_mutex_lock (priv->lock);
+ priv->results_id = 0;
+ if (!priv->results) {
+ g_mutex_unlock (priv->lock);
+ return FALSE;
+ }
+
/* Return several results at a time that can be a huge speed gain.
* What should be the value that provides speed and responsiveness. */
for (i = 0; i < 25; i ++) {
- g_mutex_lock (priv->lock);
-
if (!priv->results) {
- priv->results_id = 0;
g_mutex_unlock (priv->lock);
return FALSE;
}
@@ -336,9 +340,12 @@
result->base->destroy,
FALSE);
brasero_io_job_result_free (result);
+ g_mutex_lock (priv->lock);
}
- return TRUE;
+ g_mutex_unlock (priv->lock);
+
+ return FALSE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]