Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tron-explore
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张建华@五瓣科技
tron-explore
Commits
370e0efd
Commit
370e0efd
authored
Nov 18, 2020
by
jianhua.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整线程池数量
parent
5b00ca90
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
Executor.java
src/main/java/com/wuban/tron/explore/fetch/Executor.java
+1
-1
PersistThreadPool.java
.../java/com/wuban/tron/explore/fetch/PersistThreadPool.java
+1
-1
No files found.
src/main/java/com/wuban/tron/explore/fetch/Executor.java
View file @
370e0efd
...
...
@@ -27,7 +27,7 @@ public class Executor {
public
Executor
(
final
String
name
)
{
this
.
name
=
name
;
this
.
pool
=
new
ThreadPoolExecutor
(
SIZE
,
SIZE
*
3
,
0L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(),
this
.
pool
=
new
ThreadPoolExecutor
(
SIZE
,
SIZE
*
3
,
1
0L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(),
new
ExecutorThreadFactory
());
log
.
info
(
"初始化线程池 name:{} coreSize:{} maxSize:{}"
,
name
,
SIZE
,
SIZE
*
3
);
}
...
...
src/main/java/com/wuban/tron/explore/fetch/PersistThreadPool.java
View file @
370e0efd
...
...
@@ -26,7 +26,7 @@ public class PersistThreadPool {
public
PersistThreadPool
()
{
for
(
int
i
=
0
;
i
<
POLL_SIZE
;
i
++)
{
executors
.
add
(
new
ThreadPoolExecutor
(
POLL_SIZE
,
POLL_SIZE
*
2
,
0
,
TimeUnit
.
SECONDS
,
executors
.
add
(
new
ThreadPoolExecutor
(
POLL_SIZE
,
POLL_SIZE
*
2
,
10L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(),
new
PersistThreadFactory
(
i
)));
}
log
.
info
(
"初始化线程池 name:{} coreSize:{} maxSize:{}"
,
"PersistThreadPool"
,
POLL_SIZE
,
POLL_SIZE
*
2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment