Skip to content

rt: Remove dead code from schedule_task() - #4323

Merged
brson merged 1 commit into
rust-lang:incomingfrom
cpeterso:cpeterso-schedule-task
Jan 1, 2013
Merged

rt: Remove dead code from schedule_task()#4323
brson merged 1 commit into
rust-lang:incomingfrom
cpeterso:cpeterso-schedule-task

Conversation

@cpeterso

Copy link
Copy Markdown
Contributor
  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

brson commented Jan 1, 2013

Copy link
Copy Markdown
Contributor

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:incomingJan 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)
Fixesrust-lang#4380,
Fixesrust-lang#4323,
Fixesrust-lang#4326,
Closesrust-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
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
4323: Add tests for rust-lang#4306 r=kjeremy a=lnicola
CC @kjeremy Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Sign up for freeto 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

@cpeterso@brson