File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 47c31831a38bc2307234e54a48ad3bf071058ade
2
+ refs/heads/master: 9c05c1c2366e286275c2320995ed5066bff08dd7
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5
5
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff
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