fix: WaitForTaskYield getting stuck
This commit is contained in:
@@ -15,15 +15,15 @@ public class WaitForTaskYield(Task task, TaskCompletionStatus completionStatus =
|
||||
throw new("Task has been canceled.");
|
||||
if (task.IsFaulted)
|
||||
throw task.Exception ?? new("Task has faulted.");
|
||||
return task.IsCompletedSuccessfully;
|
||||
return !task.IsCompletedSuccessfully;
|
||||
|
||||
case TaskCompletionStatus.Failed:
|
||||
if (task.IsCompletedSuccessfully)
|
||||
throw new("Task was completed successfully.");
|
||||
return task.IsFaulted;
|
||||
return !task.IsFaulted;
|
||||
}
|
||||
|
||||
return task.IsCompleted;
|
||||
return !task.IsCompleted;
|
||||
}
|
||||
|
||||
public enum TaskCompletionStatus
|
||||
|
||||
Reference in New Issue
Block a user