Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Commit 9997e52

Browse files
Fix CTS handling
1 parent 2f0ce9c commit 9997e52

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Alidade/Services/EditBufferService.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,13 @@ private void OnMapStateChanged(object? sender, EventArgs e)
9494

9595
if (bounds is not null)
9696
{
97-
_fetchCts.Cancel();
98-
_fetchCts.Dispose();
97+
CancellationTokenSource oldCts = _fetchCts;
9998
_fetchCts = new CancellationTokenSource();
99+
_ = Task.Run(() =>
100+
{
101+
oldCts.Cancel();
102+
oldCts.Dispose();
103+
});
100104

101105
EvictOutOfViewportData(bounds);
102106

0 commit comments

Comments
 (0)