Skip to content

Commit b5befd8

Browse files
author
Kate Osborn
committed
Address code review comments
1 parent bad7653 commit b5befd8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/events/events_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ func TestEventLoop_SwapBatches(t *testing.T) {
4040
}
4141

4242
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)
4444
}
4545
}

internal/events/loop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type EventLoop struct {
3030
// The EventLoop uses double buffering to handle event batch processing.
3131
// The goroutine that handles the batch will always read from the currentBatch slice.
3232
// 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.
3434
currentBatch EventBatch
3535
nextBatch EventBatch
3636
}

0 commit comments

Comments
 (0)