From cad2a9329b3e2b550ee508e55762d75d9f8e5f60 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 15 Feb 2026 14:57:58 -0600 Subject: document the first Task.Run --- src/slskd/Transfers/Downloads/DownloadService.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') 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); -- cgit v1.2.3