]> git.lizzy.rs Git - rust.git/commit
auto merge of #12302 : alexcrichton/rust/issue-12295, r=brson
authorbors <bors@rust-lang.org>
Sun, 16 Feb 2014 07:36:26 +0000 (23:36 -0800)
committerbors <bors@rust-lang.org>
Sun, 16 Feb 2014 07:36:26 +0000 (23:36 -0800)
commitb36340b6269e1b54fb4aa3ff49a90262fb2d953c
tree9004b3c068063762803d4c5e1d786e3b3340ee4c
parent5d4fd50af3c16ffe43c8035b929374e13bb76793
parentbea7862d9470c33b7b3e21a552a991e3b948aa29
auto merge of #12302 : alexcrichton/rust/issue-12295, r=brson

The previous code erroneously assumed that 'steals > cnt' was always true, but
that was a false assumption. The code was altered to decrement steals to a
minimum of 0 instead of taking all of cnt into account.

I didn't include the exact test from #12295 because it could run for quite
awhile, and instead set the threshold for MAX_STEALS to much lower during
testing. I found that this triggered the old bug quite frequently when running
without this fix.

Closes #12295
src/libstd/comm/shared.rs
src/libstd/task.rs