Skip to content

Files

Latest commit

 

History

History
15 lines (11 loc) · 356 Bytes

0006_what-happens-if-linq-query-cancelled.md

File metadata and controls

15 lines (11 loc) · 356 Bytes

Notes

  • I got this query:

    // We allow the search to be cancelled in the middle.
    return Search(searchQuery)
        .AsParallel()
        .WithCancellation(cancellationToken)
        .ToList();

    What happens when the cancellationToken is used?

  • It seems to throw an OperationCancelledException which should be caught.