[libgda] Another correction for asynchronous statement execution
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Another correction for asynchronous statement execution
- Date: Fri, 27 Jul 2012 12:08:44 +0000 (UTC)
commit 8f142b7bd4d7838f6fbe6f51209c6c27ff6bc09d
Author: Vivien Malerba <malerba gnome-db org>
Date: Fri Jul 27 14:07:57 2012 +0200
Another correction for asynchronous statement execution
libgda/gda-connection.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index 5747afe..1588e70 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -3144,7 +3144,7 @@ async_stmt_exec_cb (G_GNUC_UNUSED GdaServerProvider *provider, GdaConnection *cn
cnc_task_unlock (task);
/* execute next waiting task if there is one */
- if (cnc->priv->waiting_tasks->len >= 1) {
+ while (cnc->priv->waiting_tasks->len >= 1) {
/* execute statement now as there are no other ones to be executed */
GError *lerror = NULL;
task = CNC_TASK (g_array_index (cnc->priv->waiting_tasks, gpointer, 0));
@@ -3173,10 +3173,13 @@ async_stmt_exec_cb (G_GNUC_UNUSED GdaServerProvider *provider, GdaConnection *cn
g_timer_stop (task->exec_timer);
g_array_remove_index (cnc->priv->waiting_tasks, 0);
g_array_append_val (cnc->priv->completed_tasks, task);
+ cnc_task_unlock (task);
}
- else
+ else {
update_meta_store_after_statement_exec (cnc, task->stmt, task->params);
- cnc_task_unlock (task);
+ cnc_task_unlock (task);
+ break;
+ }
}
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]