mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-11-01 08:03:58 +08:00
feat: 添加通用并发锁条件
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,9 +384,8 @@ public abstract class ProtocolBase : DisposableObject, IProtocol
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否需要并发锁,默认为true,对于工业主从协议,通常是必须的
|
||||
/// </summary>
|
||||
|
||||
/// <inheritdoc/>
|
||||
public virtual bool IsSingleThread { get; } = true;
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user