mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-14 18:19:28 +00:00
feat[event]: do not init event executors when not use AsyncThread
This commit is contained in:
1 parent
75b001a92f
commit
070000fbe4
7 files changed
+87
-62
No files matched your search
@@ -13,7 +13,7 @@
|
||||
|
||||
package com.zfoo.net.task;
|
||||
|
||||
import com.zfoo.event.manager.EventBus;
|
||||
import com.zfoo.event.manager.EventExecutors;
|
||||
import com.zfoo.net.NetContext;
|
||||
import com.zfoo.protocol.collection.concurrent.CopyOnWriteHashMapLongObject;
|
||||
import com.zfoo.protocol.util.AssertionUtils;
|
||||
@@ -126,7 +126,7 @@ public final class TaskBus {
|
||||
return taskExecutor;
|
||||
}
|
||||
|
||||
var eventExecutor = EventBus.threadExecutor(threadId);
|
||||
var eventExecutor = EventExecutors.threadExecutor(threadId);
|
||||
if (eventExecutor != null) {
|
||||
return eventExecutor;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class SignalBridgeTest {
|
||||
|
||||
var countDownLatch = new CountDownLatch(executorSize);
|
||||
for (var i = 0; i < executorSize; i++) {
|
||||
EventBus.execute(i, new Runnable() {
|
||||
EventBus.asyncExecute(i, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
addAndRemoveArray();
|
||||
|
||||
Reference in new issue
Block a user