public void StartWork() { // Start background task if it is not started yet. if (0 == Interlocked.CompareExchange(ref _startFlag, 1, 0)) { DoWorkAsync(BackgroundSubmissionWaitTime * 1000); } }