Skip to content

Commit

Permalink
Fix busy wait loop in benchmark stream (#1703)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano authored Feb 27, 2024
1 parent 30c624a commit 6cd0720
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/benchrunner/runners/stream/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,14 @@ func (r *runner) wipeDataStreamsOnSetup() error {
func (r *runner) run() (err error) {
r.streamData()

ticker := time.NewTicker(1 * time.Second)
defer ticker.Stop()
for {
select {
case err = <-r.errChanGenerators:
close(r.done)
return err
default:
case <-ticker.C:
if signal.SIGINT() {
close(r.done)
return nil
Expand Down

0 comments on commit 6cd0720

Please sign in to comment.