mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 04:02:09 +08:00
bug #ICPDU7 Slot中的conditionStack从默认的浅拷贝改为自定义拷贝行为,实现子线程继承父线程的栈帧,但又线程独享conditionStack
This commit is contained in:
@@ -91,8 +91,23 @@ public class Slot {
|
||||
protected ConcurrentHashMap<String, Object> metaDataMap = new ConcurrentHashMap<>();
|
||||
|
||||
private List<Tuple> contextBeanList;
|
||||
|
||||
private static final TransmittableThreadLocal<Deque<Condition>> conditionStack = TransmittableThreadLocal.withInitial(ConcurrentLinkedDeque::new);
|
||||
|
||||
private static final TransmittableThreadLocal<Deque<Condition>> conditionStack = new TransmittableThreadLocal<Deque<Condition>>() {
|
||||
@Override
|
||||
protected Deque<Condition> initialValue() {
|
||||
return new ConcurrentLinkedDeque<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Deque<Condition> copy(Deque<Condition> parentValue) {
|
||||
return new ConcurrentLinkedDeque<>(parentValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Deque<Condition> childValue(Deque<Condition> parentValue) {
|
||||
return copy(parentValue);
|
||||
}
|
||||
};
|
||||
|
||||
private Boolean routeResult;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user