diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-09-18 13:42:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-18 13:42:50 -0500 |
| commit | 6a307269ab99956fb2c5ea2149ae76c3ef24c8b2 (patch) | |
| tree | 490d0b393c33c533a1c7c0344ebb1ce346b28166 /src/slskd/Shares/ISharedFileCache.cs | |
| parent | 2700743d8b7b049a8c5fe20f398354e28ce1a94b (diff) | |
| parent | ab95c9841b2967f86b9217fddef2d70b99a57b7a (diff) | |
| download | slskd-6a307269ab99956fb2c5ea2149ae76c3ef24c8b2.tar.gz | |
Merge pull request #649 from slskd/faster-scan
Increase the speed of share scanning by 4-5x
Diffstat (limited to 'src/slskd/Shares/ISharedFileCache.cs')
| -rw-r--r-- | src/slskd/Shares/ISharedFileCache.cs | 4 |
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"/>. |
