修改多线程成单线程

This commit is contained in:
2026-03-12 18:57:14 +08:00
parent 0f5621a418
commit d1a2319105
4 changed files with 10 additions and 7 deletions

Binary file not shown.

View File

@@ -324,7 +324,7 @@ namespace Common
CSRedisClient client = WhitchRedisSlice(SliceNo);
client.LPush(key, obj);
}
public static int MaxLen = 500000;
public static int MaxLen = 800000;
public static void StreamAdd(int SliceNo, string key, string Value)
{
try

View File

@@ -169,6 +169,7 @@ namespace RCUHost.Implement
try
{
udpClient = new UdpClient(3339);
udpClient.Client.ReceiveBufferSize = 2 * 1024 * 1024;
uint IOC_IN = 0x80000000;
uint IOC_VENDOR = 0x18000000;
uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12;
@@ -179,7 +180,7 @@ namespace RCUHost.Implement
CSRedisCacheHelper.redis1.Del(UDPAllDataKey);
CSRedisCacheHelper.redis1.XGroupCreate(UDPAllDataKey, "UDPData", "0", true);
for (int i = 1; i <= 10; i++)
for (int i = 1; i <= 15; i++)
{
Task.Factory.StartNew((iii) =>
{
@@ -1761,10 +1762,10 @@ namespace RCUHost.Implement
public static object oo = new object();
private void NewXieYi(ReceiverContext context_1, string hotelCode_1, string HostNNN_1, byte[] framenolist_1, byte cmdType_1, string EndPoint_1, ushort MyFrameNO)
{
var Tuple = new Tuple<ReceiverContext, string, string, byte[], byte, string>(context_1, hotelCode_1, HostNNN_1, framenolist_1, cmdType_1, EndPoint_1);
Task.Factory.StartNew((state) =>
{
var ts = state as Tuple<ReceiverContext, string, string, byte[], byte, string>;
var ts = new Tuple<ReceiverContext, string, string, byte[], byte, string>(context_1, hotelCode_1, HostNNN_1, framenolist_1, cmdType_1, EndPoint_1);
//Task.Factory.StartNew((state) =>
// {
//var ts = state as Tuple<ReceiverContext, string, string, byte[], byte, string>;
ReceiverContext context111 = ts.Item1;
string hotelCode = ts.Item2;
string HostNNN = ts.Item3;
@@ -2743,7 +2744,7 @@ namespace RCUHost.Implement
}
#endregion
}, Tuple);
//}, Tuple);
}
public struct JiNamTongPaiTeShu
{

View File

@@ -6465,6 +6465,8 @@ namespace WebSite.Controllers
List<Host> hosts = HostManager.LoadAll().Where(t => t.RoomType.ID == roomTypeModal.RoomType.ID).ToList();
foreach (Host host in hosts)//该房型下所有主机关联回路
{
//删除掉上报的
CSRedisCacheHelper.Del_Partition(CacheKey.DingShiReportData + "_" + host.ID, 3);
var hostModal = HostModalManager.GetByModalAddress(host.ID, roomTypeModal.ModalAddress);
if (null == hostModal)
{