The relevant code
Suppose I call sync_flush before my application exits to block until all buffered and queued events have been sent. If the buffer happens to be empty at the time of the call, the body of the while loop will never execute. This means that my application can exit before all events stored in the task queue get a chance to be sent.
The relevant code
Suppose I call sync_flush before my application exits to block until all buffered and queued events have been sent. If the buffer happens to be empty at the time of the call, the body of the while loop will never execute. This means that my application can exit before all events stored in the task queue get a chance to be sent.