Skip to content

Commit 7ecb835

Browse files
committed
---
yaml --- r: 108386 b: refs/heads/dist-snap c: 9c05c1c h: refs/heads/master v: v3
1 parent 4441b5e commit 7ecb835

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 47c31831a38bc2307234e54a48ad3bf071058ade
9+
refs/heads/dist-snap: 9c05c1c2366e286275c2320995ed5066bff08dd7
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libstd/comm/shared.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,6 @@ impl<T: Send> Packet<T> {
305305
// See the discussion in the stream implementation for why we we
306306
// might decrement steals.
307307
Some(data) => {
308-
self.steals += 1;
309308
if self.steals > MAX_STEALS {
310309
match self.cnt.swap(0, atomics::SeqCst) {
311310
DISCONNECTED => {
@@ -314,11 +313,12 @@ impl<T: Send> Packet<T> {
314313
n => {
315314
let m = cmp::min(n, self.steals);
316315
self.steals -= m;
317-
self.cnt.fetch_add(n - m, atomics::SeqCst);
316+
self.bump(n - m);
318317
}
319318
}
320319
assert!(self.steals >= 0);
321320
}
321+
self.steals += 1;
322322
Ok(data)
323323
}
324324

branches/dist-snap/src/libstd/comm/stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ impl<T: Send> Packet<T> {
213213
// down as much as possible (without going negative), and then
214214
// adding back in whatever we couldn't factor into steals.
215215
Some(data) => {
216-
self.steals += 1;
217216
if self.steals > MAX_STEALS {
218217
match self.cnt.swap(0, atomics::SeqCst) {
219218
DISCONNECTED => {
@@ -222,11 +221,12 @@ impl<T: Send> Packet<T> {
222221
n => {
223222
let m = cmp::min(n, self.steals);
224223
self.steals -= m;
225-
self.cnt.fetch_add(n - m, atomics::SeqCst);
224+
self.bump(n - m);
226225
}
227226
}
228227
assert!(self.steals >= 0);
229228
}
229+
self.steals += 1;
230230
match data {
231231
Data(t) => Ok(t),
232232
GoUp(up) => Err(Upgraded(up)),

0 commit comments

Comments
 (0)