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

Separate context switching from multithreaded scheduling #6856

Closed
brson opened this issue May 31, 2013 · 7 comments
Closed

Separate context switching from multithreaded scheduling #6856

brson opened this issue May 31, 2013 · 7 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 May 31, 2013

The Scheduler type has two distinct responsibilities: at its core it is just a way to coordinate coroutines on a single thread. On top of that are a number of mechanisms and policies for multithreading and I/O. There should be multiple types here.

@catamorphism
Copy link
Contributor

Bug triage. Seems like an internal (non-blocking) issue to me.

@toddaaro
Copy link
Contributor

toddaaro commented Aug 6, 2013

Not sure what exactly the goal is here. This hints at the backwards relationship between coroutines and tasks that used to exist, is that what this was referring to?

@brson
Copy link
Contributor Author

brson commented Aug 6, 2013

Not sure how much I can clarify this. It's sort of a fuzzy issue about separation of responsibilities. The Scheduler type does two things: 1) provides a core of context switching between tasks; 2) provides a bunch of logic for coordinating the scheduling of tasks between threads. This feels like two different issues, deserving of two types.

@toddaaro
Copy link
Contributor

Ok, that phrasing clears things up. We want a Scheduler trait that provides logic for deciding what tasks to run where, and a ContextChanger trait that provides implementations of the context-changing functions. This could be a great place for default methods, as we could do custom schedulers as implementations of the Scheduler trait with the default implementations from ContextChanger.

@huonw
Copy link
Member

huonw commented Nov 3, 2013

Triage: I'm not sure I understand this, and I don't really understand the scheduler code, but, as far as I can tell, this hasn't happened yet.

@emberian
Copy link
Member

emberian commented Apr 7, 2014

I also don't understand this, but Scheduler lives in libgreen.

@thestinger
Copy link
Contributor

#17325 means this is no longer relevant to the standard libraries.

flip1995 pushed a commit to flip1995/rust that referenced this issue Mar 25, 2021
Fix `manual_map` suggestion for `if let.. else ... if let.. else` chain

fixes: rust-lang#6847

changelog: Fix `manual_map` suggestion for `if let.. else ... if let.. else` chain
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

6 participants