Skip to content

Commit

Permalink
fix: protect writes with monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Dec 13, 2024
1 parent ad86391 commit afc146a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,12 @@ public ApiFuture<Void> setCallback(Executor exec, ReadyCallback cb) {
}

private void initiateProduceRows() {
if (this.state == State.STREAMING_INITIALIZED) {
this.state = State.RUNNING;
synchronized (monitor) {
if (this.state == State.STREAMING_INITIALIZED) {
this.state = State.RUNNING;
}
produceRowsInitiated = true;
}
produceRowsInitiated = true;
this.service.execute(new ProduceRowsRunnable());
}

Expand Down

0 comments on commit afc146a

Please sign in to comment.