lith 4 anos atrás
pai
commit
2c1656edbe

+ 5 - 2
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Mode/SpinWait/DeliveryClient.cs

@@ -1,4 +1,5 @@
 using System;
+using System.Diagnostics;
 using System.Runtime.CompilerServices;
 using System.Threading;
 using Sers.CL.Socket.Iocp.Base;
@@ -93,7 +94,7 @@ namespace Sers.CL.Socket.Iocp.Mode.SpinWait
 
         LongTaskHelp Send_task = new LongTaskHelp();
 
-
+ 
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         void Send_Flush()
         {
@@ -102,7 +103,9 @@ namespace Sers.CL.Socket.Iocp.Mode.SpinWait
                 try
                 {
                     _conn.FlushSendFrameQueue();
-                    global::System.Threading.SpinWait.SpinUntil(() => false, sendFlushInterval);
+ 
+                    //global::System.Threading.SpinWait.SpinUntil(() => false, sendFlushInterval);
+                    Thread.Sleep(sendFlushInterval); 
                 }
                 catch (Exception ex) when (!(ex.GetBaseException() is ThreadInterruptedException))
                 {

+ 2 - 1
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Mode/SpinWait/DeliveryServer.cs

@@ -103,7 +103,8 @@ namespace Sers.CL.Socket.Iocp.Mode.SpinWait
                     {
                         conn.FlushSendFrameQueue();
                     }
-                    global::System.Threading.SpinWait.SpinUntil(() => false, sendFlushInterval);
+                    //global::System.Threading.SpinWait.SpinUntil(() => false, sendFlushInterval);
+                    Thread.Sleep(sendFlushInterval);
                 }
                 catch (Exception ex) when (!(ex.GetBaseException() is ThreadInterruptedException))
                 {