mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
!23 补充提交 DataBus 性能优化 Lock Free
Merge pull request !23 from 王大锤/lock-free
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user