Skip to content

Commit 0f1c7c3

Browse files
author
Dynesshely
committed
💾 Feat: Download file in Multi threads
1 parent 9111770 commit 0f1c7c3

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Algorithm.Interop/Environment.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ public static void InstallEnvironment()
6060
{
6161
if (!File.Exists($"{dll_path}{fn}"))
6262
{
63-
wc.DownloadFile(
64-
new Uri($"{cloudUrl}{version}/{fn}", UriKind.Absolute),
65-
Path.GetFullPath($"{dll_path}{fn}"));
63+
new Thread(() =>
64+
{
65+
wc.DownloadFile(
66+
new Uri($"{cloudUrl}{version}/{fn}", UriKind.Absolute),
67+
Path.GetFullPath($"{dll_path}{fn}"));
68+
}).Start();
6669
}
6770
}
6871
wc.Dispose();

0 commit comments

Comments
 (0)