aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-09-17 17:16:49 -0500
committerJP Dillingham <jp@dillingham.me>2022-09-17 17:16:49 -0500
commit6b4753de8ac69deded25ed671497adf2adeba943 (patch)
tree56cc482ae20fbefbfb643118fbdea2d69b30eac3 /src
parentbd2d0f0e044376684ddd3176bca1b9101cbd793e (diff)
downloadslskd-6b4753de8ac69deded25ed671497adf2adeba943.tar.gz
pass a CancellationToken to FillAsync
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Shares/ISharedFileCache.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slskd/Shares/ISharedFileCache.cs b/src/slskd/Shares/ISharedFileCache.cs
index 7043b030..52c7783c 100644
--- a/src/slskd/Shares/ISharedFileCache.cs
+++ b/src/slskd/Shares/ISharedFileCache.cs
@@ -19,6 +19,7 @@ namespace slskd.Shares
{
using System.Collections.Generic;
using System.Text.RegularExpressions;
+ using System.Threading;
using System.Threading.Tasks;
using Soulseek;
@@ -44,8 +45,9 @@ namespace slskd.Shares
/// <remarks>Initiates the scan, then yields execution back to the caller; does not wait for the operation to complete.</remarks>
/// <param name="shares">The list of shares from which to fill the cache.</param>
/// <param name="filters">The list of regular expressions used to exclude files or paths from scanning.</param>
+ /// <param name="cancellationToken">The optional cancellation token to monitor.</param>
/// <returns>The operation context.</returns>
- Task FillAsync(IEnumerable<Share> shares, IEnumerable<Regex> filters);
+ Task FillAsync(IEnumerable<Share> shares, IEnumerable<Regex> filters, CancellationToken cancellationToken = default);
/// <summary>
/// Returns the contents of the specified <paramref name="directory"/>.