Pārlūkot izejas kodu

Add volatile in double-checked locking field in ClusterBuilderSlot (#466)

master
mjaow Eric Zhao pirms 5 gadiem
vecāks
revīzija
5c0fd5651a
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/clusterbuilder/ClusterBuilderSlot.java

+ 1
- 1
sentinel-core/src/main/java/com/alibaba/csp/sentinel/slots/clusterbuilder/ClusterBuilderSlot.java Parādīt failu

@@ -70,7 +70,7 @@ public class ClusterBuilderSlot extends AbstractLinkedProcessorSlot<DefaultNode>

private static final Object lock = new Object();

private ClusterNode clusterNode = null;
private volatile ClusterNode clusterNode = null;

@Override
public void entry(Context context, ResourceWrapper resourceWrapper, DefaultNode node, int count,


Notiek ielāde…
Atcelt
Saglabāt