del[thread]: delete SafeRunnable

This commit is contained in:
godotg committed 2023-09-02 20:29:08 +08:00
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));
}
/**