-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rt(alt): fix a number of concurrency bugs #5907
Conversation
Expands loom coverage and fixes a number of bugs.
@@ -93,6 +93,8 @@ pub struct Builder { | |||
/// How many ticks before yielding to the driver for timer and I/O events? | |||
pub(super) event_interval: u32, | |||
|
|||
pub(super) local_queue_capacity: usize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR makes the local queue capacity configurable but does not expose the option. At some point, it might, but right now, it is for tests.
tokio/src/runtime/builder.rs
Outdated
@@ -511,7 +519,6 @@ impl Builder { | |||
/// .build(); | |||
/// # } | |||
/// ``` | |||
#[cfg(not(loom))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will revert his. I don't think it is needed anymore.
Edit: this was left over debugging code gone wrong. Looks like there is another spot it is failing
|
The broken CI depends on #5908 |
@@ -58,6 +61,10 @@ impl Driver { | |||
)) | |||
} | |||
|
|||
pub(crate) fn is_enabled(&self) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is added so the scheduler can avoid the extra thread if there are no resources to drive.
Expands loom coverage and fixes a number of bugs.
Closes #5888
Depends on: tokio-rs/loom#323