+ g_return_if_fail(async->status != ASYNC_COMPLETE);
+
+ g_mutex_lock(async->store->lock);
+ async->store->pending--;
+ if (async->store->pending == 0)
+ g_cond_broadcast(async->store->cond_idle);
+ g_mutex_unlock(async->store->lock);
+
+ async->status = ASYNC_COMPLETE;
+ g_cond_broadcast(async->completion_cond);
+
+ while (async->notifiers != NULL) {
+ struct BlueSkyNotifierList *nl = async->notifiers;
+ async->notifiers = nl->next;
+ g_thread_pool_push(notifier_thread_pool, nl, NULL);
+ }
+}
+
+static void test_notifier(gpointer a, gpointer u)
+{
+ g_print("Notifier called!\n");
+}
+
+void bluesky_store_async_submit(BlueSkyStoreAsync *async)
+{
+ BlueSkyStore *store = async->store;
+
+ /* Barriers are handled specially, and not handed down the storage
+ * implementation layer. */
+ if (async->op = STORE_OP_BARRIER) {
+ async->status = ASYNC_RUNNING;
+ if (GPOINTER_TO_INT(async->store_private) == 0)
+ bluesky_store_async_mark_complete(async);