+ g_mutex_unlock(store->lock);
+ g_print("Operations are complete.\n");
+}
+
+/* Convenience wrappers that perform a single operation synchronously. */
+BlueSkyRCStr *bluesky_store_get(BlueSkyStore *store, const gchar *key)
+{
+ BlueSkyStoreAsync *async = bluesky_store_async_new(store);
+ async->op = STORE_OP_GET;
+ async->key = g_strdup(key);
+ bluesky_store_async_submit(async);
+
+ bluesky_store_async_wait(async);
+
+ BlueSkyRCStr *data = async->data;
+ bluesky_string_ref(data);
+ bluesky_store_async_unref(async);
+ return data;
+}
+
+void bluesky_store_put(BlueSkyStore *store,
+ const gchar *key, BlueSkyRCStr *val)
+{
+ BlueSkyStoreAsync *async = bluesky_store_async_new(store);
+ async->op = STORE_OP_PUT;
+ async->key = g_strdup(key);
+ bluesky_string_ref(val);
+ async->data = val;
+ bluesky_store_async_submit(async);
+
+ bluesky_store_async_wait(async);
+ bluesky_store_async_unref(async);