brasero r1987 - in trunk: . src
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1987 - in trunk: . src
- Date: Sat, 21 Feb 2009 21:15:20 +0000 (UTC)
Author: philippr
Date: Sat Feb 21 21:15:20 2009
New Revision: 1987
URL: http://svn.gnome.org/viewvc/brasero?rev=1987&view=rev
Log:
2009-02-21 Philippe Rouquier <ykw localhost localdomain>
Brasero was not returning all results which led to a blocking exploration
of directories.
* 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 Sat Feb 21 21:15:20 2009
@@ -302,25 +302,22 @@
BraseroIOResultCallbackData *data;
BraseroIOJobResult *result;
BraseroIOPrivate *priv;
+ guint results_id;
int i;
priv = BRASERO_IO_PRIVATE (self);
g_mutex_lock (priv->lock);
+
+ /* Put that to 0 for now so that a new idle call will be scheduled while
+ * we are in the loop. That way if we block the other one will be able
+ * to deliver the results. */
+ results_id = priv->results_id;
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 ++) {
- if (!priv->results) {
- g_mutex_unlock (priv->lock);
- return FALSE;
- }
-
+ * What should be the value that provides speed and responsiveness? */
+ for (i = 0; priv->results && i < 25; i ++) {
result = priv->results->data;
priv->results = g_slist_remove (priv->results, result);
@@ -340,11 +337,19 @@
result->base->destroy,
FALSE);
brasero_io_job_result_free (result);
+
g_mutex_lock (priv->lock);
}
- g_mutex_unlock (priv->lock);
+ if (!priv->results_id && priv->results) {
+ /* There are still results and no idle call is scheduled so we
+ * have to restart ourselves to make sure we empty the queue */
+ priv->results_id = results_id;
+ g_mutex_unlock (priv->lock);
+ return TRUE;
+ }
+ g_mutex_unlock (priv->lock);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]