Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
green: Fix a scheduler assertion on yielding
This commit fixes a small bug in the green scheduler where a scheduler task calling `maybe_yield` would trip the assertion that `self.yield_check_count > 0` This behavior was seen when a scheduler task was scheduled many times successively, sending messages in a loop (via the channel `send` method), which in turn invokes `maybe_yield`. Yielding on a sched task doesn't make sense because as soon as it's done it will implicitly do a yield, and for this reason the yield check is just skipped if it's a sched task. I am unable to create a reliable test for this behavior, as there's no direct way to have control over the scheduler tasks. cc rust-lang#12666, I discovered this when investigating that issue
- Loading branch information
678b031
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+