当前位置:网站首页>Create thread pool demo
Create thread pool demo
2022-06-30 09:28:00 【Xiao Lu, a migrant worker in Beijing】
@Component
public class BlacklistRuleHandlerProxy {
private final static ExecutorService EXECUTOR_SERVICE;
static {
EXECUTOR_SERVICE = Executors.newFixedThreadPool(10, new ThreadFactory() {
private AtomicInteger count = new AtomicInteger(0);
@Override
public Thread newThread(@NotNull Runnable r) {
int i = count.incrementAndGet();
Thread t = new Thread(r);
t.setDaemon(true);
t.setName("blacklist-"+i);
return t;
}
});
}
}
边栏推荐
- Talk about how the kotlin process started?
- 100 lines of code and a voice conversation assistant
- Express file download
- Solution to the sixth training competition of 2020 provincial competition
- [wechat applet] realize applet pull-down refresh and pull-up loading
- What are the SQL add / delete / modify queries?
- 2021-10-20
- Deep Learning with Pytorch-Train A Classifier
- Installation, use and explanation of vulnerability scanning tool OpenVAS
- Harmonyos actual combat - ten thousand words long article understanding service card development process
猜你喜欢

Talking about kotlin process exception handling mechanism

Set, map and modularity

I once met a girl whom I most wanted to take care of all my life. Later... No later

2021-10-20

Terminal -- Zsh of terminal three swordsmen

Express get request

ES6 learning path (II) let & const

Talk about how the kotlin collaboration process establishes structured concurrency

Opencv learning notes-day14 drawing of image geometry (rect class rotatedrect class, rectangle drawing rectangle circle drawing circular function line drawing line function ellipse drawing elliptic fu

Opencv learning notes -day10 logical operation of image pixels (usage of rectangle function and rect function and bit related operation in openCV)
随机推荐
Small program learning path 1 - getting to know small programs
Esp32 (4): overview of the overall code architecture
RPC understanding
Reading notes of "Introduction to deep learning: pytoch"
Flink Sql -- toAppendStream doesn‘t support consuming update and delete changes which
Acquisition de 100% des actions de Guilin latex par Guilin Robust Medical pour combler le vide de la gamme de produits Latex
Do you want the dialog box that pops up from the click?
Advanced technology management -- how managers design and build echelons
POJ 1753 flip game (DFS 𞓜 bit operation)
Six implementation methods of singleton mode
Flink sql -- No factory implements ‘org. apache. flink. table. delegation. ExecutorFactory‘.
Dart asynchronous task
Express - static resource request
Get to know handler again
Opencv learning notes -day2 (implemented by the color space conversion function cvtcolar(), and imwrite image saving function imwrite())
I'm late for school
Express の post request
Duplicate entry '2' for key 'primary appears in JPA‘
100 lines of code and a voice conversation assistant
8.8 heap insertion and deletion