补充提交

This commit is contained in:
王大锤
2021-05-19 17:45:52 +08:00
parent 6f5adc0675
commit aebc5dfeea

View File

@@ -47,7 +47,7 @@ public class DataBus {
QUEUE = IntStream.range(0, slotSize - 1).boxed().collect(Collectors.toCollection(ConcurrentLinkedQueue::new));
}
public synchronized static int offerSlot(Class<? extends Slot> slotClazz) {
public static int offerSlot(Class<? extends Slot> slotClazz) {
try {
Slot slot = slotClazz.newInstance();
Integer slotIndex = QUEUE.poll();