Skip to content

Commit a25c95a

Browse files
committed
---
yaml --- r: 100895 b: refs/heads/snap-stage3 c: 9c05c1c h: refs/heads/master i: 100893: 8cdb43e 100891: 23f825a 100887: 76c9f4f 100879: 4118392 100863: 696ce11 v: v3
1 parent 0b49e96 commit a25c95a

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e3b1f3c443c048913e2d573fcc5a9c2be3484a78
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 47c31831a38bc2307234e54a48ad3bf071058ade
4+
refs/heads/snap-stage3: 9c05c1c2366e286275c2320995ed5066bff08dd7
55
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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/snap-stage3/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)