diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-02-15 14:57:58 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-02-15 14:57:58 -0600 |
| commit | cad2a9329b3e2b550ee508e55762d75d9f8e5f60 (patch) | |
| tree | 240bbe196e5fe609caddbdab4106270c84d25a32 /src | |
| parent | 6a64e22d0ac53f4059637dc02686059136e27595 (diff) | |
| download | slskd-cad2a9329b3e2b550ee508e55762d75d9f8e5f60.tar.gz | |
document the first Task.Run
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Transfers/Downloads/DownloadService.cs | 8 |
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); |
