All pastes #33681 Raw Edit

med 2 (pkt)

public text v1 · immutable
#33681 ·published 2005-12-14 18:11 UTC
rendered paste body
Index: C:/Documents and Settings/-Wooden-/workspace/L2_GameServer/java/net/sf/l2j/gameserver/ClientScheduler.java
===================================================================
--- C:/Documents and Settings/-Wooden-/workspace/L2_GameServer/java/net/sf/l2j/gameserver/ClientScheduler.java	(revision 1934)
+++ C:/Documents and Settings/-Wooden-/workspace/L2_GameServer/java/net/sf/l2j/gameserver/ClientScheduler.java	(working copy)
@@ -55,6 +55,7 @@
 	private final ScheduledThreadPoolExecutor _executorHighPriority;
 	private final ScheduledThreadPoolExecutor _executorMedPriority;
 	private final ScheduledThreadPoolExecutor _executorLowPriority;
+	private final ScheduledThreadPoolExecutor _executorMedPriority2;
 
 
 	/**
@@ -76,6 +77,7 @@
 		_executorHighPriority = new ScheduledThreadPoolExecutor(Config.THREAD_P_HIGH, new ThrFactory(1, "PoolHIGH"));
 		_executorMedPriority = new ScheduledThreadPoolExecutor(Config.THREAD_P_MED, new ThrFactory(0, "PoolMED"));
 		_executorLowPriority = new ScheduledThreadPoolExecutor(Config.THREAD_P_LOW, new ThrFactory(-1, "PoolLOW"));
+		_executorMedPriority2 = new ScheduledThreadPoolExecutor(Config.THREAD_P_MED, new ThrFactory(0, "PoolMed-2(pkt)"));
 	}
 	
 	/**
@@ -83,17 +85,20 @@
 	 */
 	public void closeAll()
 	{
-		try { _executorHighPriority.shutdown(); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
-		try { _executorMedPriority.shutdown(); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
+		try { _executorHighPriority.shutdown(); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
+		try { _executorMedPriority.shutdown(); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
 		try { _executorLowPriority.shutdown(); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
-		
-		try { _executorHighPriority.awaitTermination(1000, TimeUnit.MILLISECONDS); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
-		try { _executorMedPriority.awaitTermination(1000, TimeUnit.MILLISECONDS); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
-		try { _executorLowPriority.awaitTermination(1000, TimeUnit.MILLISECONDS); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
+        try { _executorMedPriority2.shutdown(); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
 		
+		try { _executorHighPriority.awaitTermination(1000, TimeUnit.MILLISECONDS); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
+		try { _executorMedPriority.awaitTermination(1000, TimeUnit.MILLISECONDS); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
+		try { _executorLowPriority.awaitTermination(1000, TimeUnit.MILLISECONDS); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
+        try { _executorMedPriority2.awaitTermination(1000, TimeUnit.MILLISECONDS); } catch (Throwable t) { _log.log(Level.WARNING, "", t); }
+		
 		_executorHighPriority.shutdownNow();
-		_executorHighPriority.shutdownNow();
-		_executorHighPriority.shutdownNow();
+		_executorMedPriority.shutdownNow();
+		_executorLowPriority.shutdownNow();
+        _executorMedPriority2.shutdownNow();
 	}
 	
 	
@@ -118,7 +123,7 @@
 			_instance._executorHighPriority.execute(pkt);
 			return;
 		case PR_MEDIUM:
-			_instance._executorMedPriority.execute(pkt);
+			_instance._executorMedPriority2.execute(pkt);
 			return;
 		case PR_LOW:
 		default: