Remove the DCB write queue locking

Since only one thread can append to the DCBs write queue at a time, there
is no need to lock it.
This commit is contained in:
Markus Makela
2016-10-26 23:42:33 +03:00
parent 076b810c1e
commit 68d3fc1092
2 changed files with 5 additions and 21 deletions

View File

@ -884,13 +884,11 @@ static int gw_write_backend_event(DCB *dcb)
uint8_t* data = NULL;
bool com_quit = false;
spinlock_acquire(&dcb->writeqlock);
if (dcb->writeq)
{
data = (uint8_t *) GWBUF_DATA(dcb->writeq);
com_quit = MYSQL_IS_COM_QUIT(data);
}
spinlock_release(&dcb->writeqlock);
if (data)
{