private QueueSystem() { _howToDownload = new Dictionary<string, Func<Tile, Task<Tile>>>(); _tilesBuffer = new QueueBuffer(); _memoryCache = new LruCache<string, byte[]>(1000); _storageCache = new Dictionary<string, IOfflineStorage>(); _executantPool = new ExecutantPool(6); RetryMaxCount = 5; _executantPool.DownloadImageCompleted += _executantPool_DownloadImageCompleted; }
public ExecutantPool(int count) { _ss = new SemaphoreSlim(count); _requestBuffer = new QueueBuffer(); _downloading = new Dictionary<string, Tile>(); }