线程创建多个
parent
85bf6d74dc
commit
3900141126
|
@ -55,13 +55,13 @@ public class ProtocolsManager implements ProtocolsAbstract {
|
|||
private Map<Integer, BaseHandler> handlers = new HashMap<>();
|
||||
private static ClassLoader classLoader = GameApplication.class.getClassLoader();
|
||||
public final static int HANDLER_THREAD_NUM = 50;
|
||||
public HandlerLogicThread[] handlerThreads = new HandlerLogicThread[HANDLER_THREAD_NUM];
|
||||
public static HandlerLogicThread[] handlerThreads = new HandlerLogicThread[HANDLER_THREAD_NUM];
|
||||
|
||||
private ProtocolsManager() {
|
||||
static {
|
||||
initContext();
|
||||
}
|
||||
|
||||
public void initContext() {
|
||||
private static void initContext() {
|
||||
for (int i = 0; i < HANDLER_THREAD_NUM; i++) {
|
||||
handlerThreads[i] = new HandlerLogicThread();
|
||||
handlerThreads[i].setPriority(9);//优先级最高
|
||||
|
|
Loading…
Reference in New Issue