feat: 添加通用并发锁条件

This commit is contained in:
Kimdiego2098
2024-04-26 09:28:44 +08:00
parent 72d8fd5be0
commit dd9fbbcfa7
2 changed files with 8 additions and 4 deletions

View File

@@ -66,6 +66,11 @@ public interface IProtocol : IDisposable
/// <inheritdoc/>
bool OnLine { get; }
/// <summary>
/// 是否需要并发锁默认为true对于工业主从协议通常是必须的
/// </summary>
bool IsSingleThread { get; }
#endregion
#region
@@ -572,4 +577,4 @@ public interface IProtocol : IDisposable
/// 配置IPluginManager
/// </summary>
Action<IPluginManager> ConfigurePlugins();
}
}

View File

@@ -384,9 +384,8 @@ public abstract class ProtocolBase : DisposableObject, IProtocol
}
}
/// <summary>
/// 是否需要并发锁默认为true对于工业主从协议通常是必须的
/// </summary>
/// <inheritdoc/>
public virtual bool IsSingleThread { get; } = true;
/// <summary>