mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
wait in the new spawned thread
This commit is contained in:
@@ -100,17 +100,16 @@ public class FeedRefreshTaskGiver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void start() {
|
public void start() {
|
||||||
try {
|
|
||||||
// sleeping for a little while, let everything settle
|
|
||||||
Thread.sleep(60000);
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
log.error("interrupted while sleeping");
|
|
||||||
}
|
|
||||||
log.info("starting feed refresh task giver");
|
log.info("starting feed refresh task giver");
|
||||||
|
|
||||||
executor.execute(new Runnable() {
|
executor.execute(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
try {
|
||||||
|
// sleeping for a little while, let everything settle
|
||||||
|
Thread.sleep(60000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
log.error("interrupted while sleeping");
|
||||||
|
}
|
||||||
while (!executor.isShutdown()) {
|
while (!executor.isShutdown()) {
|
||||||
try {
|
try {
|
||||||
FeedRefreshContext context = take();
|
FeedRefreshContext context = take();
|
||||||
|
|||||||
Reference in New Issue
Block a user