Skip to content

Commit

Permalink
set threads to daemon as per Netflix#759
Browse files Browse the repository at this point in the history
  • Loading branch information
cplee committed Apr 16, 2015
1 parent 2d0ce6b commit 2f0524b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public ThreadPoolExecutor getThreadPool(final HystrixThreadPoolKey threadPoolKey

@Override
public Thread newThread(Runnable r) {
return new Thread(r, "hystrix-" + threadPoolKey.name() + "-" + threadNumber.incrementAndGet());
Thread thread = new Thread(r, "hystrix-" + threadPoolKey.name() + "-" + threadNumber.incrementAndGet());
thread.setDaemon(true);
return thread;
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ public void initialize() {

@Override
public Thread newThread(Runnable r) {
return new Thread(r, "HystrixTimer-" + counter.incrementAndGet());
Thread thread = new Thread(r, "HystrixTimer-" + counter.incrementAndGet());
thread.setDaemon(true);
return thread;
}

});
Expand Down

0 comments on commit 2f0524b

Please sign in to comment.