mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Version 4.12.2 Improved ImageLoader/TileImageLoader
This commit is contained in:
parent
fefc4e3294
commit
85c54f075c
|
|
@ -87,11 +87,9 @@ namespace MapControl
|
||||||
|
|
||||||
if (newTasks > 0)
|
if (newTasks > 0)
|
||||||
{
|
{
|
||||||
var loadTasks = Enumerable.Range(0, newTasks).Select(n => LoadTilesFromQueueAsync());
|
|
||||||
|
|
||||||
Interlocked.Add(ref taskCount, newTasks);
|
Interlocked.Add(ref taskCount, newTasks);
|
||||||
|
|
||||||
Task.WhenAll(loadTasks); // not awaited
|
Task.WhenAll(Enumerable.Range(0, newTasks).Select(n => LoadTilesFromQueueAsync())); // not awaited
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -107,8 +105,6 @@ namespace MapControl
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//Debug.WriteLine("TileImageLoader: loading {0}/{1}/{2} in thread {3}", tile.ZoomLevel, tile.XIndex, tile.Y, Environment.CurrentManagedThreadId);
|
|
||||||
|
|
||||||
await loadTileImage(tile).ConfigureAwait(false);
|
await loadTileImage(tile).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue