Skip to content

Conversation

oriongonza
Copy link

If the queue is at capacity (100) and we push something to it it will grow, but the push_bounded will still block when there's plenty of space left.

@rustbot
Copy link
Collaborator

rustbot commented Mar 2, 2025

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 2, 2025
@ehuss
Copy link
Contributor

ehuss commented Mar 2, 2025

Thanks for the PR! I don't think the capacity of VecDeque is guaranteed to be exact. Can you say more about why this is needed?

@oriongonza
Copy link
Author

This is not exactly needed, but this solves the issue mentioned above, the unfortunate situation when the sender blocks when it doesn't need to.

I don't think the capacity of VecDeque is guaranteed to be exact

https://github.com/rust-lang/cargo/blob/master/src/cargo/core/compiler/job_queue/mod.rs#L485 I don't think you care ;)

Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but the push_bounded will still block when there's plenty of space left.

The bound is expected to be static if I understand the code correctly.

Why does this need to support a dynamic bound? Any Cargo bad behavior you saw?

@ehuss ehuss added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 15, 2025
@weihanglo
Copy link
Member

Close due to inactivity and no response for a few months.

@weihanglo weihanglo closed this Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants