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

rt: Remove dead code from schedule_task() #4323

Merged
merged 1 commit into from
Jan 1, 2013
Merged

rt: Remove dead code from schedule_task() #4323

merged 1 commit into from
Jan 1, 2013

Conversation

cpeterso
Copy link
Contributor

@cpeterso cpeterso commented Jan 1, 2013

  1. schedule_task() had a useless loop left over from when the running_tasks list was searched linearly for a runnable task.
  2. schedule_task() asserted this is not null. This is not a very useful assertion, especially since the function already dereferenced this->lock. :)
  3. number_of_live_tasks() accessed running_tasks and blocked_tasks lists without a lock.

@brson
Copy link
Contributor

brson commented Jan 1, 2013

Thanks! This looks good to me.

Next time I write assert(this) (assuming I wrote that but maybe not) I'll be sure to add a comment why. I don't remember what exactly it was protecting against, but there is some tricky multithreading around this class so presumably at some point there was a problem with this being deleted in another thread. Regardless, it's not doing anything now so good riddance.

brson added a commit that referenced this pull request Jan 1, 2013
rt: Remove dead code from schedule_task()
@brson brson merged commit 84a37a3 into rust-lang:incoming Jan 1, 2013
@cpeterso cpeterso deleted the cpeterso-schedule-task branch January 1, 2013 05:54
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 14, 2020
…1995

Improvements for `type_repetition_in_bounds` lint

Some improvements for `type_repetition_in_bounds`:
- add a configurable threshold to trigger the lint (rust-lang#4380). The lint won't trigger anymore if there are more bounds (strictly) than `conf.max_trait_bounds` on this type.
- take generic args into account over bounded type (rust-lang#4323)
- don't lint for predicates generated in macros (rust-lang#4326)

Fixes rust-lang#4380,
Fixes rust-lang#4323,
Fixes rust-lang#4326,
Closes rust-lang#3764

changelog: Fix multiple FPs in `type_repetition_in_bounds` and add a configuration option

Note: the rust-lang#3764 has already been fixed but not closed
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