Run background work, but ensure that this can only run once at any given time [duplicate]
问题 This question already has answers here : Check if task is already running before starting new (4 answers) Closed 2 years ago . I want to kick off some background work, I do not have to keep any reference. Start and forget. However I want to make sure that this background work is only running once at any time given. Assuming that StartBackgroundWork is only ever called from one thread, can you improve this solution? Do you see any problems with this? private bool _busy; private void