Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f7ff8047
authored
Jul 20, 2016
by
xueli.xue
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
任务执行队列,采用Poll(Timeout)方式;
parent
5c2bcb9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
xxl-job-core/src/main/java/com/xxl/job/core/handler/HandlerThread.java
xxl-job-core/src/main/java/com/xxl/job/core/handler/HandlerThread.java
View file @
f7ff8047
...
@@ -13,6 +13,7 @@ import java.io.StringWriter;
...
@@ -13,6 +13,7 @@ import java.io.StringWriter;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.TimeUnit
;
/**
/**
* handler thread
* handler thread
...
@@ -55,7 +56,7 @@ public class HandlerThread extends Thread{
...
@@ -55,7 +56,7 @@ public class HandlerThread extends Thread{
public
void
run
()
{
public
void
run
()
{
while
(!
toStop
){
while
(!
toStop
){
try
{
try
{
Map
<
String
,
String
>
handlerData
=
handlerDataQueue
.
take
(
);
Map
<
String
,
String
>
handlerData
=
handlerDataQueue
.
poll
(
3L
,
TimeUnit
.
SECONDS
);
if
(
handlerData
!=
null
)
{
if
(
handlerData
!=
null
)
{
i
=
0
;
i
=
0
;
String
log_address
=
handlerData
.
get
(
HandlerParamEnum
.
LOG_ADDRESS
.
name
());
String
log_address
=
handlerData
.
get
(
HandlerParamEnum
.
LOG_ADDRESS
.
name
());
...
...
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