File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
branches/dist-snap/src/libstd/comm Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: 47c31831a38bc2307234e54a48ad3bf071058ade
9
+ refs/heads/dist-snap: 9c05c1c2366e286275c2320995ed5066bff08dd7
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change @@ -305,7 +305,6 @@ impl<T: Send> Packet<T> {
305
305
// See the discussion in the stream implementation for why we we
306
306
// might decrement steals.
307
307
Some ( data) => {
308
- self . steals += 1 ;
309
308
if self . steals > MAX_STEALS {
310
309
match self . cnt . swap ( 0 , atomics:: SeqCst ) {
311
310
DISCONNECTED => {
@@ -314,11 +313,12 @@ impl<T: Send> Packet<T> {
314
313
n => {
315
314
let m = cmp:: min ( n, self . steals ) ;
316
315
self . steals -= m;
317
- self . cnt . fetch_add ( n - m, atomics :: SeqCst ) ;
316
+ self . bump ( n - m) ;
318
317
}
319
318
}
320
319
assert ! ( self . steals >= 0 ) ;
321
320
}
321
+ self . steals += 1 ;
322
322
Ok ( data)
323
323
}
324
324
Original file line number Diff line number Diff line change @@ -213,7 +213,6 @@ impl<T: Send> Packet<T> {
213
213
// down as much as possible (without going negative), and then
214
214
// adding back in whatever we couldn't factor into steals.
215
215
Some ( data) => {
216
- self . steals += 1 ;
217
216
if self . steals > MAX_STEALS {
218
217
match self . cnt . swap ( 0 , atomics:: SeqCst ) {
219
218
DISCONNECTED => {
@@ -222,11 +221,12 @@ impl<T: Send> Packet<T> {
222
221
n => {
223
222
let m = cmp:: min ( n, self . steals ) ;
224
223
self . steals -= m;
225
- self . cnt . fetch_add ( n - m, atomics :: SeqCst ) ;
224
+ self . bump ( n - m) ;
226
225
}
227
226
}
228
227
assert ! ( self . steals >= 0 ) ;
229
228
}
229
+ self . steals += 1 ;
230
230
match data {
231
231
Data ( t) => Ok ( t) ,
232
232
GoUp ( up) => Err ( Upgraded ( up) ) ,
You can’t perform that action at this time.
0 commit comments