Complete networking integration gate (#58)
This commit is contained in:
@@ -319,6 +319,24 @@ impl DownloadManager {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Number of URI-deduplicated downloads currently queued or executing.
|
||||
#[must_use]
|
||||
pub fn active_download_count(&self) -> usize {
|
||||
mutex(&self.0.active).len()
|
||||
}
|
||||
|
||||
/// Whether the dispatcher has completed its idempotent teardown.
|
||||
#[must_use]
|
||||
pub fn is_disposed(&self) -> bool {
|
||||
self.0.disposed.load(Ordering::Acquire)
|
||||
}
|
||||
|
||||
/// Whether a dispatcher thread is still owned by this manager.
|
||||
#[must_use]
|
||||
pub fn dispatcher_running(&self) -> bool {
|
||||
mutex(&self.0.dispatcher).is_some()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn parallel_downloads(&self) -> i32 {
|
||||
i32::try_from(self.0.parallel_downloads.load(Ordering::Acquire)).unwrap_or(i32::MAX)
|
||||
|
||||
Reference in New Issue
Block a user