Remove volatile from HandlerList to improve event performance
This commit is contained in:
@@ -107,7 +107,7 @@ public class AkarinUserCache {
|
||||
Runnable find = () -> profileRepo.findProfilesByNames(new String[] { keyUsername }, Agent.MINECRAFT, callbackHandler);
|
||||
if (async) {
|
||||
MCUtil.scheduleAsyncTask(find);
|
||||
return null; // TODO: future
|
||||
return null;
|
||||
} else {
|
||||
find.run();
|
||||
return gameProfile[0];
|
||||
|
||||
@@ -51,7 +51,7 @@ public final class MCUtil {
|
||||
}
|
||||
|
||||
public static boolean isMainThread() {
|
||||
return MinecraftServer.getServer().isMainThread();
|
||||
return ThreadAssertion.isMainThread() && MinecraftServer.getServer().isMainThread(); // Akarin
|
||||
}
|
||||
|
||||
private static class DelayedRunnable implements Runnable {
|
||||
|
||||
Reference in New Issue
Block a user