Reference count async queue transactions

so we can put them of task message queues
This commit is contained in:
Douglas Clowes
2015-07-29 17:47:15 +10:00
parent 7ccbf7e0bd
commit 0db57b9bae
3 changed files with 49 additions and 15 deletions

View File

@@ -75,6 +75,16 @@ pAsyncTxn AsyncUnitPrepareTxn(pAsyncUnit unit,
AsyncTxnHandler responseHandler,
void *context, int rsp_len);
/** \brief clone a pointer to the transaction - must use AsyncUnitFreeTxn
* \param txn the transaction to clone
*/
pAsyncTxn AsyncUnitHoldTxn(pAsyncTxn txn);
/** \brief free a cloned transaction
* \param txn the transaction to free (returned by AsyncUnitHoldTxn)
*/
void AsyncUnitFreeTxn(pAsyncTxn txn);
/** \brief prepare and queue a transaction
*
* \param unit AsyncUnit