mirror of
				https://gitee.com/ThingsGateway/ThingsGateway.git
				synced 2025-10-31 23:53:58 +08:00 
			
		
		
		
	底层通道设备列表更换为线程安全列表
This commit is contained in:
		| @@ -22,7 +22,7 @@ public interface IChannel : IConnectObject, ICloseObject, ISetupConfigObject, ID | ||||
|     /// <summary> | ||||
|     /// 该通道下的所有设备 | ||||
|     /// </summary> | ||||
|     public List<IProtocol> Collects { get; } | ||||
|     public ConcurrentList<IProtocol> Collects { get; } | ||||
|  | ||||
|     /// <summary> | ||||
|     /// CanSend | ||||
|   | ||||
| @@ -29,7 +29,7 @@ namespace ThingsGateway.Foundation | ||||
|         public EasyLock WaitLock { get; } = new EasyLock(); | ||||
|  | ||||
|         /// <inheritdoc/> | ||||
|         public List<IProtocol> Collects { get; } = new(); | ||||
|         public ConcurrentList<IProtocol> Collects { get; } = new(); | ||||
|  | ||||
|         /// <summary> | ||||
|         /// 接收到数据 | ||||
|   | ||||
| @@ -34,7 +34,7 @@ namespace ThingsGateway.Foundation | ||||
|         public EasyLock WaitLock { get; } = new EasyLock(); | ||||
|  | ||||
|         /// <inheritdoc/> | ||||
|         public List<IProtocol> Collects { get; } = new(); | ||||
|         public ConcurrentList<IProtocol> Collects { get; } = new(); | ||||
|  | ||||
|         /// <inheritdoc/> | ||||
|         protected override void Dispose(bool disposing) | ||||
|   | ||||
| @@ -20,7 +20,7 @@ namespace ThingsGateway.Foundation | ||||
|     public class TgTcpClient : TgTcpClientBase, IClientChannel | ||||
|     { | ||||
|         /// <inheritdoc/> | ||||
|         public List<IProtocol> Collects { get; } = new(); | ||||
|         public ConcurrentList<IProtocol> Collects { get; } = new(); | ||||
|  | ||||
|         /// <inheritdoc/> | ||||
|         public EasyLock WaitLock { get; } = new EasyLock(); | ||||
|   | ||||
| @@ -26,7 +26,7 @@ namespace ThingsGateway.Foundation | ||||
|         } | ||||
|  | ||||
|         /// <inheritdoc/> | ||||
|         public List<IProtocol> Collects { get; } = new(); | ||||
|         public ConcurrentList<IProtocol> Collects { get; } = new(); | ||||
|  | ||||
|         #region 事件 | ||||
|  | ||||
|   | ||||
| @@ -56,7 +56,7 @@ namespace ThingsGateway.Foundation | ||||
|         DataHandlingAdapter IClientChannel.DataHandlingAdapter => DataHandlingAdapter; | ||||
|  | ||||
|         /// <inheritdoc/> | ||||
|         public List<IProtocol> Collects { get; } = new(); | ||||
|         public ConcurrentList<IProtocol> Collects { get; } = new(); | ||||
|  | ||||
|         /// <inheritdoc/> | ||||
|         public void SetDataHandlingAdapter(DataHandlingAdapter adapter) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Kimdiego2098
					Kimdiego2098