Skip to content
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

Make friend schedulers more robust #10343

Closed
brson opened this issue Nov 8, 2013 · 3 comments
Closed

Make friend schedulers more robust #10343

brson opened this issue Nov 8, 2013 · 3 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

Comments

@brson
Copy link
Contributor

brson commented Nov 8, 2013

Right now when you spawn a SingleThreaded task, its scheduler is given a 'friend' scheduler to which it sends work that can't be executed. This creates a situation where threads that are rejecting a lot of work serialize a bunch of tasks through a single other thread which may not be able to run that work in a reasonable time.

Instead of sending work to a single friend it needs to either go back into the general pool, or (better) single-threaded schedulers should add their work queues to the global pool of work queues for stealing.

@brson
Copy link
Contributor Author

brson commented Nov 8, 2013

We could band-aid over one of the most common deadlocking problems this causes by making the runtime detect situations where a single-threaded scheduler spawns another single-threaded scheduler (creating a chain of single-threaded friends), and doing the spawn from the friend.

@alexcrichton
Copy link
Member

This will be dealt with by #10965 because spawned schedulers will be full-fledged citizens of the sched pool (just as much so as everyone else).

@alexcrichton
Copy link
Member

Closed by #10965, we no longer have by-default spawned friend schedulers.

Jarcho pushed a commit to Jarcho/rust that referenced this issue Feb 26, 2023
uninlined_format_args: do not inline argument with generic parameters

Fix rust-lang#10339

---

changelog: FP: [`uninlined_format_args`]: No longer lints for arguments with generic parameters
[rust-lang#10343](rust-lang/rust-clippy#10343)
<!-- changelog_checked -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
Projects
None yet
Development

No branches or pull requests

2 participants