Deliver fake events for the current dcb immediately

If a fake event is added to the current dcb, we arrange things so
that it is delivered immediately when the handling of the event(s)
during which the fake event was added, has been performed.

Otherwise the event is delivered via the event loop.
This commit is contained in:
Johan Wikman
2017-09-06 12:33:50 +03:00
parent 19407a09f8
commit 44db97215f
2 changed files with 47 additions and 11 deletions

View File

@ -156,6 +156,7 @@ typedef struct dcb
GWBUF *delayq; /**< Delay Backend Write Data Queue */
GWBUF *readq; /**< Read queue for storing incomplete reads */
GWBUF *fakeq; /**< Fake event queue for generated events */
uint32_t fake_event; /**< Fake event to be delivered to handler */
DCBSTATS stats; /**< DCB related statistics */
struct dcb *nextpersistent; /**< Next DCB in the persistent pool for SERVER */