Esri / arcobjects-sdk-community-samples

This repo contains the source code samples (.Net c#, .Net vb, and C++) that demonstrate the usage of the ArcObject SDK.
Apache License 2.0
124 stars 194 forks source link

how to use IScreenDisplay in Task #14

Closed yh371174229 closed 5 years ago

yh371174229 commented 5 years ago

I want to use multi threads(like Task) to improve display performance,but when i use task,the tile doesn't display in map ,In task ,I use IDisplay para,so I doubt whether the IDisplay para is the problem which causes the data don't display.

List<Task>taskList=new List<Task>();
for(var tile in tiles)
{
    taskList.Add(Task.Run(() =>displaying my tiles code));
}
Task.WhenAll(taskList.ToArray());

Forgive my poor English,Any help will appreciated!