about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-03-10 15:10:56 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-03-12 13:39:47 -0700
commit91bed14ca8085887a26d029d785d853ad2587718 (patch)
tree1594c5d38605029822e4cd70fe0139b37258292a /src/rustllvm/ExecutionEngineWrapper.cpp
parent80f92f5c5fedadd131842977c0b9b21806f3902f (diff)
downloadrust-91bed14ca8085887a26d029d785d853ad2587718.tar.gz
rust-91bed14ca8085887a26d029d785d853ad2587718.zip
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 #12666, I discovered this when investigating that issue
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions