aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-02-15 14:57:58 -0600
committerJP Dillingham <jp@dillingham.me>2026-02-15 14:57:58 -0600
commitcad2a9329b3e2b550ee508e55762d75d9f8e5f60 (patch)
tree240bbe196e5fe609caddbdab4106270c84d25a32 /src
parent6a64e22d0ac53f4059637dc02686059136e27595 (diff)
downloadslskd-cad2a9329b3e2b550ee508e55762d75d9f8e5f60.tar.gz
document the first Task.Run
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Transfers/Downloads/DownloadService.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs
index cd135d19..66fa6246 100644
--- a/src/slskd/Transfers/Downloads/DownloadService.cs
+++ b/src/slskd/Transfers/Downloads/DownloadService.cs
@@ -462,6 +462,14 @@ namespace slskd.Transfers.Downloads
Log.Debug("Scheduling Task for enqueue of {Filename} from {Username}", file.Filename, username);
+ /*
+ rip off one task for each file in the batch, leaving each to internally wait their turn
+ to proceed with the actual enqueue request and subsequent download, orchestrated by the
+ concurrent enqueue request semaphore
+
+ we don't wait for any of them; as long as the Task is successfully scheduled (Task.Run doesn't throw),
+ we consider it a success.
+ */
var downloadEnqueueTask = Task.Run(async () =>
{
Log.Debug("Awaiting download enqueue semaphore for {Filename} from {Username}", transfer.Filename, transfer.Username);