I need to be able to check if a specific task is running:
Task.Run(() =>
{
int counter = 720;
int sleepTime = 7000;
int operationId = 0;
Thread.CurrentThread.Name = "GetTasksStatusAsync";
......
so in my code somewhere in another class I need to check “GetTasksStatusAsync” is running.
thanks
How about
Basically I would store my tasks somewhere and make them accessible for other classes. Then you can check the status of the task with the code above. Refer to the TaskStatus-Documentation.