lith 3 năm trước cách đây
mục cha
commit
f4f2b2631e
32 tập tin đã thay đổi với 90 bổ sung54 xóa
  1. 1 1
      Publish/ReleaseFile/docker-image/docker导入导出镜像.md
  2. 1 1
      Publish/ReleaseFile/docker-image/制作镜像Sers.md
  3. 1 1
      dotnet/Gateway/App.Gateway/App.Gateway.csproj
  4. 1 1
      dotnet/Library/Sers/Sers.CL/Ipc/Sers.CL.Ipc.NamedPipe/Doc/Sers.CL.Ipc.NamedPipe-额外命名管道/Sers.CL.Ipc.NamedPipe.csproj
  5. 1 1
      dotnet/Library/Sers/Sers.CL/Ipc/Sers.CL.Ipc.NamedPipe/Sers.CL.Ipc.NamedPipe.csproj
  6. 1 1
      dotnet/Library/Sers/Sers.CL/Ipc/Sers.CL.Ipc.SharedMemory/Sers.CL.Ipc.SharedMemory.csproj
  7. 1 1
      dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Sers.CL.Socket.Iocp.csproj
  8. 1 1
      dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/Sers.CL.Socket.ThreadWait.csproj
  9. 1 1
      dotnet/Library/Sers/Sers.CL/WebSocket/Sers.CL.WebSocket/Sers.CL.WebSocket.csproj
  10. 1 1
      dotnet/Library/Sers/Sers.CL/Zmq/FullDuplex/Sers.CL.Zmq.FullDuplex/Sers.CL.Zmq.FullDuplex.csproj
  11. 1 1
      dotnet/Library/Sers/Sers.CL/Zmq/ThreadWait/Sers.CL.ClrZmq.ThreadWait/Sers.CL.ClrZmq.ThreadWait.csproj
  12. 1 1
      dotnet/Library/Sers/Sers.Core/Sers.Core.Temp/Sers.Core.Temp.csproj
  13. 1 1
      dotnet/Library/Sers/Sers.Core/Sers.Core/Sers.Core.csproj
  14. 1 1
      dotnet/Library/Sers/Sers.Gateway/Sers.Gateway/Sers.Gateway.csproj
  15. 1 1
      dotnet/Library/Sers/Sers.Hardware/Sers.Hardware/Sers.Hardware.csproj
  16. 1 1
      dotnet/Library/Sers/Sers.Serslot/Sers.Serslot/Sers.Serslot.csproj
  17. 1 1
      dotnet/Library/Sers/Sers.ServiceStation/Sers.ServiceStation/Sers.ServiceStation.csproj
  18. 28 13
      dotnet/Library/Vit/Vit.Core/Test/Vit.Core.Util.Threading.Worker.MsTest/Worker/LongThread_Test.cs
  19. 25 4
      dotnet/Library/Vit/Vit.Core/Vit.Core/Util/Threading/Worker/LongThread.cs
  20. 1 1
      dotnet/Library/Vit/Vit.Core/Vit.Core/Vit.Core.csproj
  21. 1 1
      dotnet/Library/Vit/Vit.Net.Http.FormFile/Vit.Net.Http.FormFile.csproj
  22. 1 1
      dotnet/Library/Vit/Vit.WebHost/Vit.WebHost.csproj
  23. 1 1
      dotnet/ServiceCenter/App.Gover.Gateway/App.Gover.Gateway.csproj
  24. 8 8
      dotnet/ServiceCenter/App.ServiceCenter.NetFx/App.ServiceCenter.NetFx/packages.config
  25. 1 1
      dotnet/ServiceCenter/App.ServiceCenter/App.ServiceCenter.csproj
  26. 1 1
      dotnet/ServiceCenter/Sers.ServiceCenter/Apm/Sers.Gover.Apm.Txt/Sers.Gover.Apm.Txt.csproj
  27. 1 1
      dotnet/ServiceCenter/Sers.ServiceCenter/Apm/Sers.Gover.Apm.Zipkin/Sers.Gover.Apm.Zipkin.csproj
  28. 1 1
      dotnet/ServiceCenter/Sers.ServiceCenter/Sers.Gover/Sers.Gover.csproj
  29. 1 1
      dotnet/ServiceCenter/Sers.ServiceCenter/Sers.ServiceCenter/Sers.ServiceCenter.csproj
  30. 1 1
      dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.Demo/Did.SersLoader.Demo.csproj
  31. 1 1
      dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.HelloWorld/Did.SersLoader.HelloWorld.csproj
  32. 1 1
      dotnet/ServiceStation/Demo/StressTest/App.Robot.Station/App.Robot.Station.csproj

+ 1 - 1
Publish/ReleaseFile/docker-image/docker导入导出镜像.md

@@ -1,5 +1,5 @@
 #导出镜像
-tag=2.1.12
+tag=2.1-temp
 
 docker save -o /root/image/dotnet.2.1.tar serset/dotnet:2.1
 docker save -o /root/image/sers-cgateway-1.2.0.tar serset/sers-cgateway:1.2.0

+ 1 - 1
Publish/ReleaseFile/docker-image/制作镜像Sers.md

@@ -37,7 +37,7 @@ cd /root/image
 
 
 #构建镜像并推送到 Docker Hub 
-export tag=2.1.12
+export tag=2.1-temp
 
 cd sers
 docker buildx build . -t serset/sers:${tag} -t serset/sers --platform=linux/amd64,linux/arm64,linux/arm/v7 --push

+ 1 - 1
dotnet/Gateway/App.Gateway/App.Gateway.csproj

@@ -8,7 +8,7 @@
 	<PropertyGroup>
 		<OutputType>Exe</OutputType>
 		<TargetFramework>netcoreapp2.1</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 		<PackageProjectUrl>https://github.com/serset/Sers</PackageProjectUrl>
 	</PropertyGroup>
 

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Ipc/Sers.CL.Ipc.NamedPipe/Doc/Sers.CL.Ipc.NamedPipe-额外命名管道/Sers.CL.Ipc.NamedPipe.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.12</Version>
+    <Version>2.1.13-temp</Version>
     <Description>https://github.com/serset/Sers</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Ipc/Sers.CL.Ipc.NamedPipe/Sers.CL.Ipc.NamedPipe.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Ipc/Sers.CL.Ipc.SharedMemory/Sers.CL.Ipc.SharedMemory.csproj

@@ -2,7 +2,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Sers.CL.Socket.Iocp.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/Sers.CL.Socket.ThreadWait.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/WebSocket/Sers.CL.WebSocket/Sers.CL.WebSocket.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Zmq/FullDuplex/Sers.CL.Zmq.FullDuplex/Sers.CL.Zmq.FullDuplex.csproj

@@ -3,7 +3,7 @@
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
 		<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.CL/Zmq/ThreadWait/Sers.CL.ClrZmq.ThreadWait/Sers.CL.ClrZmq.ThreadWait.csproj

@@ -2,7 +2,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.Core/Sers.Core.Temp/Sers.Core.Temp.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.12</Version>
+    <Version>2.1.13-temp</Version>
   </PropertyGroup>
   
   <PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.Core/Sers.Core/Sers.Core.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.Gateway/Sers.Gateway/Sers.Gateway.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.Hardware/Sers.Hardware/Sers.Hardware.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.Serslot/Sers.Serslot/Sers.Serslot.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Sers/Sers.ServiceStation/Sers.ServiceStation/Sers.ServiceStation.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 28 - 13
dotnet/Library/Vit/Vit.Core/Test/Vit.Core.Util.Threading.Worker.MsTest/Worker/LongThread_Test.cs

@@ -1,10 +1,6 @@
 using Microsoft.VisualStudio.TestTools.UnitTesting;
-
 using System;
 using System.Threading;
-using System.Threading.Tasks;
-using System.Timers;
-
 using Vit.Core.Util.Threading.Worker;
 
 namespace Vit.Core.Util.Threading.MsTest.Worker
@@ -15,12 +11,36 @@ namespace Vit.Core.Util.Threading.MsTest.Worker
         [TestMethod]
         public void TestMethod()
         {
-            int count = 0;         
+            int count = 0;
+
+            LongThread.Run(
+                () =>
+                {
+                    while (count < 10)
+                    {
+                        var curCount = Interlocked.Increment(ref count);
+                        Console.Out.WriteLine($"[{curCount}]start ");
+                        Thread.Sleep(10);
+                    }
+                }
+             );
+
+            Thread.Sleep(500);
+
+            Assert.AreEqual(10, count);
+        }
+
+
+        [TestMethod]
+        public void TestMethod_MultiThread()
+        {
+            int count = 0;
 
             var task = new LongThread
             {
+                threadCount = 2,
                 Processor = () =>
-                {               
+                {
                     while (true)
                     {
                         var curCount = Interlocked.Increment(ref count);
@@ -30,21 +50,16 @@ namespace Vit.Core.Util.Threading.MsTest.Worker
                 }
             };
 
-            task.threadCount = 2;
-
             task.Start();
 
             Thread.Sleep(500);
 
             task.Stop();
 
-            Assert.AreEqual(6,count);
+            Assert.AreEqual(6, count);
 
             Thread.Sleep(200);
-            Assert.AreEqual(6,count);
-
-       
-             
+            Assert.AreEqual(6, count);
         }
     }
 }

+ 25 - 4
dotnet/Library/Vit/Vit.Core/Vit.Core/Util/Threading/Worker/LongThread.cs

@@ -14,6 +14,30 @@ namespace Vit.Core.Util.Threading.Worker
     public class LongThread : IDisposable
     {
 
+        #region Run
+        public static LongThread Run(Action action, int threadCount = 1)
+        {
+            var task = new LongThread(action, threadCount);
+            task.Start();
+            return task;
+        }
+        #endregion
+
+
+
+
+        public LongThread(int threadCount=1) 
+        { 
+            this.threadCount = threadCount;
+        }
+
+        public LongThread(Action action, int threadCount = 1) : this(threadCount)
+        {
+            Processor = action;
+        }
+
+
+
         /// <summary>
         /// 请勿处理ThreadInterruptedException异常,否则导致线程无法正常结束
         /// 不可抛异常
@@ -68,10 +92,7 @@ namespace Vit.Core.Util.Threading.Worker
         public bool IsRunning => runningThreadCount != 0;//threads != null && threads.Any(item=> item.IsAlive);
 
 
-        public LongThread()
-        {
-            threadCount = 1;
-        }
+        
         ~LongThread()
         {
             Dispose();

+ 1 - 1
dotnet/Library/Vit/Vit.Core/Vit.Core/Vit.Core.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.11</Version>
+		<Version>2.1.12-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Vit/Vit.Net.Http.FormFile/Vit.Net.Http.FormFile.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.11</Version>
+		<Version>2.1.12-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/Library/Vit/Vit.WebHost/Vit.WebHost.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.11</Version>
+		<Version>2.1.12-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/ServiceCenter/App.Gover.Gateway/App.Gover.Gateway.csproj

@@ -8,7 +8,7 @@
 	<PropertyGroup>
 		<OutputType>Exe</OutputType>
 		<TargetFramework>netcoreapp2.1</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 		<PackageProjectUrl>https://github.com/serset/Sers</PackageProjectUrl>
 	</PropertyGroup>
 

+ 8 - 8
dotnet/ServiceCenter/App.ServiceCenter.NetFx/App.ServiceCenter.NetFx/packages.config

@@ -4,14 +4,14 @@
   <package id="Microsoft.DotNet.PlatformAbstractions" version="2.0.0" targetFramework="net461" />
   <package id="Microsoft.Extensions.DependencyModel" version="2.0.0" targetFramework="net461" />
   <package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
-  <package id="Sers.CL.Ipc.NamedPipe" version="2.1.12" targetFramework="net461" />
-  <package id="Sers.CL.Socket.Iocp" version="2.1.12" targetFramework="net461" />
-  <package id="Sers.CL.Socket.ThreadWait" version="2.1.12" targetFramework="net461" />
-  <package id="Sers.CL.WebSocket" version="2.1.12" targetFramework="net461" />
-  <package id="Sers.Core" version="2.1.12" targetFramework="net461" />
-  <package id="Sers.Gover" version="2.1.12" targetFramework="net461" />
-  <package id="Sers.Hardware" version="2.1.12" targetFramework="net461" />
-  <package id="Sers.ServiceCenter" version="2.1.12" targetFramework="net461" />
+  <package id="Sers.CL.Ipc.NamedPipe" version="2.1.13-temp" targetFramework="net461" />
+  <package id="Sers.CL.Socket.Iocp" version="2.1.13-temp" targetFramework="net461" />
+  <package id="Sers.CL.Socket.ThreadWait" version="2.1.13-temp" targetFramework="net461" />
+  <package id="Sers.CL.WebSocket" version="2.1.13-temp" targetFramework="net461" />
+  <package id="Sers.Core" version="2.1.13-temp" targetFramework="net461" />
+  <package id="Sers.Gover" version="2.1.13-temp" targetFramework="net461" />
+  <package id="Sers.Hardware" version="2.1.13-temp" targetFramework="net461" />
+  <package id="Sers.ServiceCenter" version="2.1.13-temp" targetFramework="net461" />
   <package id="System.Buffers" version="4.5.1" targetFramework="net461" />
   <package id="Vit.Core" version="2.1.10" targetFramework="net461" />
 </packages>

+ 1 - 1
dotnet/ServiceCenter/App.ServiceCenter/App.ServiceCenter.csproj

@@ -8,7 +8,7 @@
 	<PropertyGroup>
 		<OutputType>Exe</OutputType>
 		<TargetFramework>netcoreapp2.1</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 		<PackageProjectUrl>https://github.com/serset/Sers</PackageProjectUrl>
 	</PropertyGroup>
 

+ 1 - 1
dotnet/ServiceCenter/Sers.ServiceCenter/Apm/Sers.Gover.Apm.Txt/Sers.Gover.Apm.Txt.csproj

@@ -2,7 +2,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/ServiceCenter/Sers.ServiceCenter/Apm/Sers.Gover.Apm.Zipkin/Sers.Gover.Apm.Zipkin.csproj

@@ -2,7 +2,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/ServiceCenter/Sers.ServiceCenter/Sers.Gover/Sers.Gover.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/ServiceCenter/Sers.ServiceCenter/Sers.ServiceCenter/Sers.ServiceCenter.csproj

@@ -6,7 +6,7 @@
 
 	<PropertyGroup>
 		<TargetFramework>netstandard2.0</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 	</PropertyGroup>
 
 	<PropertyGroup>

+ 1 - 1
dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.Demo/Did.SersLoader.Demo.csproj

@@ -8,7 +8,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.12</Version>
+    <Version>2.1.13-temp</Version>
     <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
     <Description>https://github.com/serset/Sers</Description>
   </PropertyGroup>

+ 1 - 1
dotnet/ServiceStation/Demo/SersLoader/Did.SersLoader.HelloWorld/Did.SersLoader.HelloWorld.csproj

@@ -3,7 +3,7 @@
 	<PropertyGroup>
 		<OutputType>Exe</OutputType>
 		<TargetFramework>netcoreapp2.1</TargetFramework>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 		<Description>https://github.com/serset/Sers</Description>
 	</PropertyGroup>
 

+ 1 - 1
dotnet/ServiceStation/Demo/StressTest/App.Robot.Station/App.Robot.Station.csproj

@@ -9,7 +9,7 @@
 		<OutputType>Exe</OutputType>
 		<TargetFramework>netcoreapp2.1</TargetFramework>
 		<RunPostBuildEvent>Always</RunPostBuildEvent>
-		<Version>2.1.12</Version>
+		<Version>2.1.13-temp</Version>
 		<Description>https://github.com/serset/Sers</Description>
 	</PropertyGroup>