Skip to content

Commit

Permalink
增加线程池
Browse files Browse the repository at this point in the history
  • Loading branch information
yangkw committed Nov 17, 2017
1 parent e3f8bd7 commit 975aa1b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions ProxyIpPool
Submodule ProxyIpPool added at e3f8bd
16 changes: 16 additions & 0 deletions src/main/java/com/myapp/util/Executor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.myapp.util;

import java.util.concurrent.*;

/**
* Created by 杨凯文 on 2017/11/17 0017.
*/
public class Executor{
/**
* Cannot instantiate.
*/
public static ExecutorService newMyexecutor(int size) {
return new ThreadPoolExecutor(size,size+10,
1, TimeUnit.MINUTES,new ArrayBlockingQueue<Runnable>(16));
}
}

0 comments on commit 975aa1b

Please sign in to comment.