forked from External/mage
* Reduced created JBoss OneWay Threads on Client from 100 to 10. Some formatting.
This commit is contained in:
parent
8491b5b90b
commit
8549f72010
3 changed files with 298 additions and 209 deletions
|
|
@ -10,12 +10,16 @@ import java.util.concurrent.TimeUnit;
|
|||
*
|
||||
* @author ayrat
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class ThreadUtils {
|
||||
|
||||
public static final ThreadPoolExecutor threadPool;
|
||||
public static final ThreadPoolExecutor threadPool2;
|
||||
private static int threadCount;
|
||||
static {
|
||||
/** used in CardInfoPaneImpl
|
||||
*
|
||||
*/
|
||||
threadPool = new ThreadPoolExecutor(4, 4, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
|
||||
@Override
|
||||
public Thread newThread (Runnable runnable) {
|
||||
|
|
@ -26,6 +30,10 @@ public class ThreadUtils {
|
|||
}
|
||||
});
|
||||
threadPool.prestartAllCoreThreads();
|
||||
|
||||
/**
|
||||
* Used for MageActionCallback
|
||||
*/
|
||||
threadPool2 = new ThreadPoolExecutor(4, 4, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
|
||||
@Override
|
||||
public Thread newThread (Runnable runnable) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue