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

Remove timer code from scheduler #1725

Closed
brson opened this issue Feb 1, 2012 · 5 comments
Closed

Remove timer code from scheduler #1725

brson opened this issue Feb 1, 2012 · 5 comments
Assignees
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Feb 1, 2012

The scheduler includes periodic timer wakeups that probably don't do anything useful now (were once for preemption). Let's give them the boot.

@brson
Copy link
Contributor Author

brson commented Feb 1, 2012

16:55 <@graydon> brson: actually yeah, my bet is on the WaitForSingleObject(thread, INFINITE) in the bottom of rust_timer.cpp
16:55 <@graydon> just delete that file and any uses of it. it's a disaster and we'll do better once we have Real Timers And Stuff from uv
16:55 <@graydon> I'm ashamed to have written it

@ghost ghost assigned brson Feb 1, 2012
@brson
Copy link
Contributor Author

brson commented Feb 2, 2012

After looking into this, rust_timer.cpp was dead code, so I removed it. The scheduler is currently using a timed_wait on a condition variable because the signals to the condition variable don't always wake the scheduler (they are not always done while the lock is held). I'm trying to fix this now and remove the timed_wait() function.

@brson
Copy link
Contributor Author

brson commented Feb 2, 2012

Currently the scheduler needs to periodically wake up whenever there are running tasks that are yielding to check whether the yield has timed out.

@brson
Copy link
Contributor Author

brson commented Feb 2, 2012

I don't know why we need the yield(time) version currently, but I would like to pursue just completely getting rid of the timer version of yield, so that yield does nothing but yield control to the scheduler. When we get uv bindings we can use their timers.

@brson
Copy link
Contributor Author

brson commented Feb 3, 2012

Done.

@brson brson closed this as completed Feb 3, 2012
sfackler added a commit to sfackler/rust that referenced this issue Dec 13, 2016
bors added a commit that referenced this issue Dec 13, 2016
Implement RFC #1725 (read_unaligned, write_unaligned)

cc #37955

r? @alexcrichton
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
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 C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

1 participant