TaskLock
A class in Root.Township, the global namespace.
Runs one async task at a time: Run does nothing if a previous task is still going. Exceptions are logged, not thrown.
- Listed in Global namespace: T to X
Constructors
| Member | What it is |
|---|---|
TaskLock(bool shouldLogOnCancel) | Creates a TaskLock with default values. |
TaskLock() | Creates a TaskLock with default values. |
Fields
3 private and internal fields
Methods
| Member | What it is |
|---|---|
async void Run(Func<Task> task) | Starts the task unless one is already running, and logs any exception it throws. |
Used in
Members of other types that take, return or hold a TaskLock: