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

Use a phantom type to indicate task/scheduler context in Scheduler #7011

Closed
brson opened this issue Jun 8, 2013 · 1 comment
Closed

Use a phantom type to indicate task/scheduler context in Scheduler #7011

brson opened this issue Jun 8, 2013 · 1 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.

Comments

@brson
Copy link
Contributor

brson commented Jun 8, 2013

Many methods in Scheduler either assert!(self.in_task_context()) or assert!(!self.in_task_context()). This would be more elegantly expressed as a phantom type, Scheduler<TaskCtxt>, Scheduler<SchedCtxt>.

bors added a commit that referenced this issue Jun 15, 2013
This un-reverts the reverts of the rusti commits made awhile back. These were reverted for an LLVM failure in rustpkg. I believe that this is not a problem with these commits, but rather that rustc is being used in parallel for rustpkg tests (in-process). This is not working yet (almost! see #7011), so I serialized all the tests to run one after another.

@brson, I'm mainly just guessing as to the cause of the LLVM failures in rustpkg tests. I'm confident that running tests in parallel is more likely to be the problem than those commits I made.

Additionally, this fixes two recently reported issues with rusti.
@emberian
Copy link
Member

emberian commented Aug 5, 2013

I do not see any such asserts or similar funcionality in rt/sched.rs, closing.

@emberian emberian closed this as completed Aug 5, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 8, 2021
Fix `redundant_clone` fp

fixes: rust-lang#5973
fixes: rust-lang#5595
fixes: rust-lang#6998

changelog: Fix `redundant_clone` fp  where the cloned value is modified while the clone is in use.
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.
Projects
None yet
Development

No branches or pull requests

2 participants