summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tumblerd/tumbler-group-scheduler.c12
-rw-r--r--tumblerd/tumbler-lifo-scheduler.c8
2 files changed, 10 insertions, 10 deletions
diff --git a/tumblerd/tumbler-group-scheduler.c b/tumblerd/tumbler-group-scheduler.c
index c97f97f..8429cfa 100644
--- a/tumblerd/tumbler-group-scheduler.c
+++ b/tumblerd/tumbler-group-scheduler.c
@@ -370,25 +370,25 @@ tumbler_group_scheduler_thread (gpointer data,
g_signal_emit_by_name (request->scheduler, "started", request->handle);
/* finish the request if it was unqueued */
+ g_mutex_lock (scheduler->mutex);
if (request->unqueued)
{
- g_mutex_lock (scheduler->mutex);
tumbler_group_scheduler_finish_request (scheduler, request);
- g_mutex_unlock (scheduler->mutex);
return;
}
+ g_mutex_unlock (scheduler->mutex);
/* process URI by URI */
for (n = 0; request->uris[n] != NULL; ++n)
{
/* finish the request if it was unqueued */
+ g_mutex_lock (scheduler->mutex);
if (request->unqueued)
{
- g_mutex_lock (scheduler->mutex);
tumbler_group_scheduler_finish_request (scheduler, request);
- g_mutex_unlock (scheduler->mutex);
return;
}
+ g_mutex_unlock (scheduler->mutex);
/* create a file infor for the current URI */
info = tumbler_file_info_new (request->uris[n]);
@@ -485,13 +485,13 @@ tumbler_group_scheduler_thread (gpointer data,
n = GPOINTER_TO_INT (lp->data);
/* finish the request if it was unqueued */
+ g_mutex_lock (scheduler->mutex);
if (request->unqueued)
{
- g_mutex_lock (scheduler->mutex);
tumbler_group_scheduler_finish_request (scheduler, request);
- g_mutex_unlock (scheduler->mutex);
return;
}
+ g_mutex_unlock (scheduler->mutex);
/* connect to the error signal of the thumbnailer */
g_signal_connect (request->thumbnailers[n], "error",
diff --git a/tumblerd/tumbler-lifo-scheduler.c b/tumblerd/tumbler-lifo-scheduler.c
index 3335eb5..d314c51 100644
--- a/tumblerd/tumbler-lifo-scheduler.c
+++ b/tumblerd/tumbler-lifo-scheduler.c
@@ -317,25 +317,25 @@ tumbler_lifo_scheduler_thread (gpointer data,
g_signal_emit_by_name (request->scheduler, "started", request->handle);
/* finish the request if it was already unqueued */
+ g_mutex_lock (scheduler->mutex);
if (request->unqueued)
{
- g_mutex_lock (scheduler->mutex);
tumbler_lifo_scheduler_finish_request (scheduler, request);
- g_mutex_unlock (scheduler->mutex);
return;
}
+ g_mutex_unlock (scheduler->mutex);
/* process URI by URI */
for (n = 0; request->uris[n] != NULL; ++n)
{
/* finish the request if it was unqueued */
+ g_mutex_lock (scheduler->mutex);
if (request->unqueued)
{
- g_mutex_lock (scheduler->mutex);
tumbler_lifo_scheduler_finish_request (scheduler, request);
- g_mutex_unlock (scheduler->mutex);
return;
}
+ g_mutex_unlock (scheduler->mutex);
/* create a file info for the current URI */
info = tumbler_file_info_new (request->uris[n]);