2 Commits

Author SHA1 Message Date
Lightczx
de074e40e0 code style [skip ci] 2024-01-31 15:36:29 +08:00
Lightczx
4cf4c6caca fix 2024-01-31 15:24:22 +08:00
5 changed files with 3 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Snap.Hutao.Deployment.Runtime</id>
<version>1.15.1</version>
<version>1.15.2</version>
<authors>DGP Studio</authors>
<developmentDependency>true</developmentDependency>
<requireLicenseAcceptance>false</requireLicenseAcceptance>

View File

@@ -5,7 +5,6 @@ using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Windows.Security.Isolation;
namespace Snap.Hutao.Deployment;
@@ -58,7 +57,7 @@ internal sealed class HttpShardCopyWorker<TStatus> : IDisposable
ShardProgress shardProgress = new(progress, statusFactory, contentLength);
ParallelOptions options = new()
{
MaxDegreeOfParallelism = Math.Clamp(2, Environment.ProcessorCount, 6),
MaxDegreeOfParallelism = Math.Clamp(Environment.ProcessorCount, 2, 6),
CancellationToken = token,
};
return Parallel.ForEachAsync(shards, options, (shard, token) => CopyShardAsync(shard, shardProgress, token));

View File

@@ -24,7 +24,7 @@ internal static partial class Invocation
ArgumentException.ThrowIfNullOrEmpty(path);
Console.WriteLine($"""
Snap Hutao Deployment Tool [1.15.1]
Snap Hutao Deployment Tool [1.15.2]
PackagePath: {path}
FamilyName: {name}
------------------------------------------------------------

View File

@@ -1,5 +1,4 @@
using System.CommandLine;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
namespace Snap.Hutao.Deployment;