about summary refs log tree commit diff
path: root/src/libstd/task.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-02-15 23:36:26 -0800
committerbors <bors@rust-lang.org>2014-02-15 23:36:26 -0800
commitb36340b6269e1b54fb4aa3ff49a90262fb2d953c (patch)
tree9004b3c068063762803d4c5e1d786e3b3340ee4c /src/libstd/task.rs
parent5d4fd50af3c16ffe43c8035b929374e13bb76793 (diff)
parentbea7862d9470c33b7b3e21a552a991e3b948aa29 (diff)
downloadrust-b36340b6269e1b54fb4aa3ff49a90262fb2d953c.tar.gz
rust-b36340b6269e1b54fb4aa3ff49a90262fb2d953c.zip
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
Diffstat (limited to 'src/libstd/task.rs')
-rw-r--r--src/libstd/task.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/libstd/task.rs b/src/libstd/task.rs
index 1065d3b3941..ceccd918140 100644
--- a/src/libstd/task.rs
+++ b/src/libstd/task.rs
@@ -65,7 +65,6 @@ use rt::task::Task;
 use str::{Str, SendStr, IntoMaybeOwned};
 
 #[cfg(test)] use any::{AnyOwnExt, AnyRefExt};
-#[cfg(test)] use ptr;
 #[cfg(test)] use result;
 
 /// Indicates the manner in which a task exited.