Skip to content

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

Limit extra sleep of BusyThread on LowMemCycle

reger13f013f64a4b
diff --git a/source/net/yacy/kelondro/workflow/AbstractBusyThread.java b/source/net/yacy/kelondro/workflow/AbstractBusyThread.java
index de15a0d80..898bcd435 100644
--- a/source/net/yacy/kelondro/workflow/AbstractBusyThread.java
+++ b/source/net/yacy/kelondro/workflow/AbstractBusyThread.java
@@ -252,7 +252,7 @@ public abstract class AbstractBusyThread extends AbstractThread implements BusyT
// do a clean-up
this.freemem();
// sleep a while
- ratz(this.idlePause + 1000*(outofmemoryCycles++));
+ ratz(this.idlePause + 1000*(outofmemoryCycles++ % 0x0F)); // limit extra sleep time (oomCycles can grow big over time)
idletime += System.currentTimeMillis() - timestamp;
}
}