mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix code
This commit is contained in:
parent
64e4d9db7b
commit
5c60b626cd
@ -29,20 +29,18 @@ public class ThreadUtilTest {
|
||||
|
||||
|
||||
@Test
|
||||
@Disabled
|
||||
public void testNewFixedExecutor(){
|
||||
|
||||
ThreadPoolExecutor executor = ThreadUtil.newFixedExecutor(1, 2, "test-", true);
|
||||
|
||||
final ThreadPoolExecutor executor = ThreadUtil.newFixedExecutor(1, 2, "test-", true);
|
||||
for (int i = 0; i < 20; i++) {
|
||||
executor.execute(()->{
|
||||
Console.log("执行任务1");
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@Test
|
||||
public void testNewExecutorByBlockingCoefficient(){
|
||||
ThreadPoolExecutor executor = ThreadUtil.newExecutorByBlockingCoefficient(0.5f);
|
||||
final ThreadPoolExecutor executor = ThreadUtil.newExecutorByBlockingCoefficient(0.5f);
|
||||
Console.log(executor.getCorePoolSize());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user