Change thread pool size
This commit is contained in:
parent
c9feb419e5
commit
0917ad4173
1 changed files with 3 additions and 3 deletions
|
@ -17,10 +17,10 @@ public class DelayedExecutorService {
|
||||||
private static final AtomicBoolean RUN = new AtomicBoolean(true);
|
private static final AtomicBoolean RUN = new AtomicBoolean(true);
|
||||||
private static AtomicInteger COUNT = new AtomicInteger(0);
|
private static AtomicInteger COUNT = new AtomicInteger(0);
|
||||||
private static final DelayedExecutorService inst;
|
private static final DelayedExecutorService inst;
|
||||||
private static final ScheduledThreadPoolExecutor repeater;
|
private static ScheduledThreadPoolExecutor repeater;
|
||||||
static{
|
static{
|
||||||
inst=new DelayedExecutorService();
|
inst=new DelayedExecutorService();
|
||||||
repeater = new ScheduledThreadPoolExecutor(20);
|
repeater = new ScheduledThreadPoolExecutor(8);
|
||||||
|
|
||||||
repeater.scheduleAtFixedRate(new Runnable() {
|
repeater.scheduleAtFixedRate(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -37,7 +37,7 @@ public class DelayedExecutorService {
|
||||||
public static void setup()
|
public static void setup()
|
||||||
{
|
{
|
||||||
stopRepeatingThread();
|
stopRepeatingThread();
|
||||||
|
repeater = new ScheduledThreadPoolExecutor(8);
|
||||||
repeater.schedule(new Runnable() {
|
repeater.schedule(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue