public async void ClearLog() { QueueTruncate = true; // Since we are clearing, we wait until the current // operation is finished if (FlushTask.Status == TaskStatus.Running) await FlushTask; }