File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,6 @@ func TestEventLoop_SwapBatches(t *testing.T) {
40
40
}
41
41
42
42
if c := cap (eventLoop .nextBatch ); c != 3 {
43
- t .Errorf ("EventLoop.swapBatches() mismatch. Expected capacity of 4 in the next batch, got %d" , c )
43
+ t .Errorf ("EventLoop.swapBatches() mismatch. Expected capacity of 3 in the next batch, got %d" , c )
44
44
}
45
45
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ type EventLoop struct {
30
30
// The EventLoop uses double buffering to handle event batch processing.
31
31
// The goroutine that handles the batch will always read from the currentBatch slice.
32
32
// While the current batch is being handled, new events are added to the nextBatch slice.
33
- // The batches are swapped after the handler finishes with the current batch .
33
+ // The batches are swapped before starting the handler goroutine .
34
34
currentBatch EventBatch
35
35
nextBatch EventBatch
36
36
}
You can’t perform that action at this time.
0 commit comments