Skip to content

Commit

Permalink
fix(core): redundant synchronization on the FlowListeners
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu authored and tchiotludo committed Jun 5, 2023
1 parent 227a161 commit 8d56a96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/io/kestra/core/runners/FlowListeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private boolean remove(Flow flow) {
}
}

private synchronized void upsert(Flow flow) {
private void upsert(Flow flow) {
synchronized (this) {
this.remove(flow);

Expand All @@ -126,7 +126,7 @@ private void notifyConsumersEach(Flow flow, Flow previous) {
}

@Override
public synchronized void listen(Consumer<List<Flow>> consumer) {
public void listen(Consumer<List<Flow>> consumer) {
synchronized (this) {
consumers.add(consumer);
consumer.accept(new ArrayList<>(this.flows()));
Expand Down

0 comments on commit 8d56a96

Please sign in to comment.