Skip to content

Commit

Permalink
clarify that queue length need not be precise
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Aug 29, 2024
1 parent 186b2a1 commit 97a5e35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/indexer/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl PlayerIndexerStub {
}

pub fn num_indexing(&self) -> usize {
self.queue.len()
self.queue.estimate_len()
}

pub fn preceding_tickets(&self, ticket: &Ticket) -> u64 {
Expand Down
2 changes: 1 addition & 1 deletion src/indexer/player_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<T: Eq + Hash + Clone> Queue<T> {
}
}

pub fn len(&self) -> usize {
pub fn estimate_len(&self) -> usize {
self.state.lock().unwrap().len()
}

Expand Down

0 comments on commit 97a5e35

Please sign in to comment.