auto merge of #11180 : alexcrichton/rust/fix-deferred-send, r=cmr

I forgot to add this back in after I removed can_resched and then realized I had
to add it back.
This commit is contained in:
bors 2013-12-28 19:06:57 -08:00
commit 38a5edbfe6
1 changed files with 1 additions and 1 deletions

View File

@ -599,7 +599,7 @@ impl<T: Send> Chan<T> {
// the TLS overhead can be a bit much.
n => {
assert!(n >= 0);
if n > 0 && n % RESCHED_FREQ == 0 {
if can_resched && n > 0 && n % RESCHED_FREQ == 0 {
let task: ~Task = Local::take();
task.maybe_yield();
}