mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-15 20:16:02 +00:00
del[thread]: delete SafeRunnable
This commit is contained in:
1 parent
9f6f154e76
commit
13d284184d
7 files changed
+26
-51
No files matched your search
@@ -18,8 +18,8 @@ import com.zfoo.protocol.collection.CollectionUtils;
|
||||
import com.zfoo.protocol.collection.concurrent.CopyOnWriteHashMapLongObject;
|
||||
import com.zfoo.protocol.util.AssertionUtils;
|
||||
import com.zfoo.protocol.util.StringUtils;
|
||||
import com.zfoo.util.SafeRunnable;
|
||||
import com.zfoo.protocol.util.RandomUtils;
|
||||
import com.zfoo.util.ThreadUtils;
|
||||
import io.netty.util.concurrent.FastThreadLocalThread;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -134,7 +134,7 @@ public abstract class EventBus {
|
||||
* Use the event thread specified by the hashcode to execute the task
|
||||
*/
|
||||
public static void execute(int executorHash, Runnable runnable) {
|
||||
executors[Math.abs(executorHash % EXECUTORS_SIZE)].execute(SafeRunnable.valueOf(runnable));
|
||||
executors[Math.abs(executorHash % EXECUTORS_SIZE)].execute(ThreadUtils.safeRunnable(runnable));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user