Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/UniGetUI.Core.Classes/TaskRecycler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
=> _removeFromCache(method.GetHashCode(), 0);

// ---------------------------------------------------------------------------------------------------------------

Check warning on line 95 in src/UniGetUI.Core.Classes/TaskRecycler.cs

View workflow job for this annotation

GitHub Actions / test-codebase

Avoid multiple blank lines (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide2000)

/// <summary>
/// Handles running the task if no such task was found on cache, and returning the cached task if it was found.
Expand All @@ -108,7 +108,7 @@
{
// Race condition, an equivalent task got added from another thread between the TryGetValue and TryAdd,
// so we are going to restart the call to _runTaskAndWait in order for TryGetValue to return the new task again
await _runTaskAndWait_VOID(task, hash, cacheTimeSecsSecs);
await _runTaskAndWait_VOID(task, hash, cacheTimeSecsSecs).ConfigureAwait(false);
return;
}
else
Expand All @@ -118,7 +118,7 @@
}

// Wait for the task to finish
await task;
await task.ConfigureAwait(false);

// Schedule the task for removal after the cache time expires
_removeFromCache_VOID(hash, cacheTimeSecsSecs);
Expand All @@ -138,7 +138,7 @@
{
// Race condition, an equivalent task got added from another thread between the TryGetValue and TryAdd,
// so we are going to restart the call to _runTaskAndWait in order for TryGetValue to return the new task again
return await _runTaskAndWait(task, hash, cacheTimeSecsSecs);
return await _runTaskAndWait(task, hash, cacheTimeSecsSecs).ConfigureAwait(false);
}
else
{
Expand All @@ -147,7 +147,7 @@
}

// Wait for the task to finish
ReturnT result = await task;
ReturnT result = await task.ConfigureAwait(false);

// Schedule the task for removal after the cache time expires
_removeFromCache(hash, cacheTimeSecsSecs);
Expand Down
Loading