wait in the new spawned thread

This commit is contained in:
Athou
2014-03-03 12:50:32 +01:00
parent a5f7b56bf2
commit 5c27f0834c

View File

@@ -100,17 +100,16 @@ public class FeedRefreshTaskGiver {
} }
public void start() { public void start() {
log.info("starting feed refresh task giver");
executor.execute(new Runnable() {
@Override
public void run() {
try { try {
// sleeping for a little while, let everything settle // sleeping for a little while, let everything settle
Thread.sleep(60000); Thread.sleep(60000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
log.error("interrupted while sleeping"); log.error("interrupted while sleeping");
} }
log.info("starting feed refresh task giver");
executor.execute(new Runnable() {
@Override
public void run() {
while (!executor.isShutdown()) { while (!executor.isShutdown()) {
try { try {
FeedRefreshContext context = take(); FeedRefreshContext context = take();