!29 修复issue: I49L1S [初始化DataBus的数据槽索引QUEUE大小的时候容量设置有问题]

Merge pull request !29 from 请叫我猿叔叔/bugfix-I49L1S-slotsizeinit
This commit is contained in:
铂赛东
2021-09-10 13:46:29 +00:00
committed by Gitee

View File

@@ -38,7 +38,7 @@ public class DataBus {
LiteflowConfig liteflowConfig = LiteflowConfigGetter.get();
int slotSize = liteflowConfig.getSlotSize();
SLOTS = new AtomicReferenceArray<>(slotSize);
QUEUE = IntStream.range(0, slotSize - 1).boxed().collect(Collectors.toCollection(ConcurrentLinkedQueue::new));
QUEUE = IntStream.range(0, slotSize).boxed().collect(Collectors.toCollection(ConcurrentLinkedQueue::new));
}
public static int offerSlot(Class<? extends Slot> slotClazz) {