Skip to content

Choose task thread in rust_scheduler by round robin #2086

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

Merged
merged 2 commits into from
Apr 1, 2012

Conversation

jamorton
Copy link
Contributor

Remove the random context from rust_scheduler and use a simple round robin system to choose which thread a new task gets put on. Also, some incorrect tab indents around scoped blocks were fixed.

Remove the random context from rust_scheduler and use a simple round robin system to choose which thread a new task gets put on. Also, some incorrect tab indents around scoped blocks were fixed.
@brson
Copy link
Contributor

brson commented Mar 31, 2012

This looks good. The only change I'd like is for cur_thread to be initialized to 0 in rust_scheduler's initialization list.

Also, I note that this will launch the first task on thread 1 instead of 0. Would make me happier if it started on 0, but not for any rational reason.

Thanks for fixing the indents. That was my mistake.

@brson brson merged commit 9851a90 into rust-lang:master Apr 1, 2012
@brson
Copy link
Contributor

brson commented Apr 1, 2012

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants