Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

do some extra sleep while running low on memory (1 sec. per outofmemoryCycle)

sixcooler411ed159f85d
diff --git a/source/net/yacy/kelondro/workflow/AbstractBusyThread.java b/source/net/yacy/kelondro/workflow/AbstractBusyThread.java
index b26f560fe..9f26d0be2 100644
--- a/source/net/yacy/kelondro/workflow/AbstractBusyThread.java
+++ b/source/net/yacy/kelondro/workflow/AbstractBusyThread.java
@@ -198,9 +198,8 @@ public abstract class AbstractBusyThread extends AbstractThread implements BusyT
// do a clean-up
this.freemem();
// sleep a while
- ratz(this.idlePause);
+ ratz(this.idlePause + 1000*(outofmemoryCycles++));
idletime += System.currentTimeMillis() - timestamp;
- outofmemoryCycles++;
}
}
this.close();