Push forward

This commit is contained in:
2026-07-14 12:22:17 +08:00
parent 576a9a44c8
commit 969cd5c5f8
135 changed files with 551 additions and 551 deletions
@@ -13,7 +13,7 @@ index 5a72fa0d72bfdb927293abe921c57f6ae964a6ec..913161732b0affa70fb114dd4087a610
@Override
public Thread newThread(final Runnable run) {
- final Thread ret = new TickThreadRunner(this.threadGroup, run, "Folia Region Scheduler Thread #" + this.idGenerator.getAndIncrement());
+ final Thread ret = new TickThreadRunner(this.threadGroup, moe.monnairealms.camellia.config.modules.optimizations.CpuAffinityConfig.wrapForTickRegion(run), "Folia Region Scheduler Thread #" + this.idGenerator.getAndIncrement()); // Shiroha - Add config for cpu affinity
+ final Thread ret = new TickThreadRunner(this.threadGroup, io.nanachiyo0721.shiroha.config.modules.optimizations.CpuAffinityConfig.wrapForTickRegion(run), "Folia Region Scheduler Thread #" + this.idGenerator.getAndIncrement()); // Shiroha - Add config for cpu affinity
ret.setUncaughtExceptionHandler(TickRegionScheduler.this::uncaughtException);
return ret;
}
@@ -27,7 +27,7 @@ index 9544eaee7e02d00226d957ea0b79cd1a1fb0c4d0..4e138fe36aa0bc519482990b60543b17
private ThreadFactory createThreadFactory() {
- return new ThreadFactoryBuilder().setNameFormat("Netty " + this.type + " IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build(); // Paper
+ var origin = new ThreadFactoryBuilder().setNameFormat("Netty " + this.type + " IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build(); // Paper // Shiroha - Add config for cpu affinity
+ return run -> origin.newThread(moe.monnairealms.camellia.config.modules.optimizations.CpuAffinityConfig.wrapForNettyIo(run)); // Shiroha - Add config for cpu affinity
+ return run -> origin.newThread(io.nanachiyo0721.shiroha.config.modules.optimizations.CpuAffinityConfig.wrapForNettyIo(run)); // Shiroha - Add config for cpu affinity
}
protected abstract IoHandlerFactory ioHandlerFactory();