Damselfly icon indicating copy to clipboard operation
Damselfly copied to clipboard

TaskCancelled Exception logged when scrolling Virtualized folder list

Open Webreaper opened this issue 5 years ago • 3 comments

https://github.com/dotnet/aspnetcore/issues/28280#

Webreaper avatar Dec 10 '20 22:12 Webreaper

It seems to be reproducible, when there is a Task.Delay in the ItemsProvider callback:

   private async ValueTask<ItemsProviderResult<Item>> ProvideItems(ItemsProviderRequest request)
   {

          using var db = _dbContextFactory.CreateDbContext();
          await Task.Delay(200, request.CancellationToken);
          var items = await db.Items.Skip(request.StartIndex)
                .Take(request.Count)
                .ToArrayAsync(request.CancellationToken);
          return new ItemsProviderResult<Item>(items,  await db.Items.CountAsync());
   }

Liero avatar Feb 18 '21 14:02 Liero

Nice. Want to post that to the aspcore project/issue above? Then somebody at MSFT might fix it. 😁

Webreaper avatar Feb 18 '21 15:02 Webreaper

I think this issue may be fixed in .Net 6 RC1 - I don't remember seeing it for a while...

Webreaper avatar Sep 28 '21 08:09 Webreaper