projects
/
bluesky.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add reference counting to asynchronous storage operations.
[bluesky.git]
/
bluesky
/
s3store.c
diff --git
a/bluesky/s3store.c
b/bluesky/s3store.c
index
5ab42e1
..
bf7c7cd
100644
(file)
--- a/
bluesky/s3store.c
+++ b/
bluesky/s3store.c
@@
-138,10
+138,9
@@
static void s3store_task(gpointer a, gpointer s)
async->result = 0;
}
async->result = 0;
}
- // TODO: Deallocate resources
-
g_print("Finish task...\n");
bluesky_store_async_mark_complete(async);
g_print("Finish task...\n");
bluesky_store_async_mark_complete(async);
+ bluesky_store_async_unref(async);
}
static gpointer s3store_new()
}
static gpointer s3store_new()
@@
-184,6
+183,7
@@
static void s3store_submit(gpointer s, BlueSkyStoreAsync *async)
case STORE_OP_GET:
case STORE_OP_PUT:
async->status = ASYNC_PENDING;
case STORE_OP_GET:
case STORE_OP_PUT:
async->status = ASYNC_PENDING;
+ bluesky_store_async_ref(async);
g_thread_pool_push(store->thread_pool, async, NULL);
break;
g_thread_pool_push(store->thread_pool, async, NULL);
break;