Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3460 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Mar 9, 2007
1 parent b3ca177 commit 3bb3df3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/de/anomic/yacy/yacyNewsPool.java
Expand Up @@ -215,10 +215,16 @@ private boolean automaticProcessP(yacyNewsRecord record) {

public yacyNewsRecord get(int dbKey, int element) throws IOException {
yacyNewsQueue queue = switchQueue(dbKey);
yacyNewsRecord record;
yacyNewsRecord record = null;
int s;
synchronized (queue) {
record = queue.top(element);
if (record == null) queue.pop(element);
while ((record == null) && ((s = queue.size()) > 0)) {
record = queue.top(element);
if (record == null) {
queue.pop(element);
if (queue.size() == s) break;
}
}
}
return record;
}
Expand Down

0 comments on commit 3bb3df3

Please sign in to comment.