Add dcb_close_in_owning_thread(DCB*);

Allows a DCB to be closed by a thread other than the owning
thread.
This commit is contained in:
Johan Wikman
2017-09-04 13:41:16 +03:00
parent ccbff0f6d4
commit b43ab674e3
2 changed files with 38 additions and 0 deletions

View File

@ -222,6 +222,16 @@ int dcb_read(DCB *, GWBUF **, int);
int dcb_drain_writeq(DCB *);
void dcb_close(DCB *);
/**
* @brief Close DCB in the thread that owns it.
*
* @param dcb The dcb to be closed.
*
* @note Even if the calling thread owns the dcb, the closing will
* still be made via the event loop.
*/
void dcb_close_in_owning_thread(DCB *dcb);
/**
* Add a DCB to the owner's list
*