DeadlockInfo.cs
662 Bytes
namespace Rcs.Application.Services.PathFind.Models;
/// <summary>
/// 死锁信息
/// @author zzy
/// </summary>
public class DeadlockInfo
{
public DateTime DetectedAt { get; set; }
public List<Guid> InvolvedRobots { get; set; } = new();
public Dictionary<Guid, Guid> WaitGraph { get; set; } = new();
}
/// <summary>
/// 死锁解决方案
/// @author zzy
/// </summary>
public class DeadlockResolution
{
public DeadlockInfo DeadlockInfo { get; set; } = null!;
public bool Success { get; set; }
public string? Reason { get; set; }
public Guid RobotToYield { get; set; }
public string YieldReason { get; set; } = string.Empty;
}