Merge pull request #129 from GeWuYou/deepsource-autofix-b7cf8394

refactor: simplify single-statement getter
This commit is contained in:
gewuyou 2026-03-22 15:30:07 +08:00 committed by GitHub
commit 8d656b90a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,12 +30,6 @@ public sealed class WaitForAllCoroutines(
/// 获取一个值,指示所有协程是否已完成执行
/// </summary>
/// <returns>当所有协程都已完成时返回true否则返回false</returns>
public bool IsDone
{
get
{
// 检查所有协程句柄是否都不在调度器中存活
return _handles.All(handle => !_scheduler.IsCoroutineAlive(handle));
}
}
// 检查所有协程句柄是否都不在调度器中存活
public bool IsDone => _handles.All(handle => !_scheduler.IsCoroutineAlive(handle));
}