public DownloadManager(int concurrencyDegree, HttpClient?httpClient = null) { _httpClient = httpClient ?? new HttpClient(); _queuedTasks = new ObservableCollection <TDownloadTask>(); _taskQuerySet = new HashSet <TDownloadTask>(); _throttle = new ReenterableAwaiter <bool>(true, true); _downloadTaskChannel = Channel.CreateUnbounded <TDownloadTask>(); _semaphoreSlim = new SemaphoreSlim(1, 1); ConcurrencyDegree = concurrencyDegree; PollTask(); }
public DownloadStartingDeferral() { Signal = new ReenterableAwaiter <bool>(true, true); }