Skip to content

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

More sync in close() methods

Roland 'Quix0r' Haederd10627d59122
diff --git a/source/net/yacy/kelondro/logging/GuiHandler.java b/source/net/yacy/kelondro/logging/GuiHandler.java
index f88695383..70d4df144 100644
--- a/source/net/yacy/kelondro/logging/GuiHandler.java
+++ b/source/net/yacy/kelondro/logging/GuiHandler.java
@@ -208,8 +208,8 @@ public class GuiHandler extends Handler {
}
- public void close() throws SecurityException {
-
+ public synchronized void close() throws SecurityException {
+ // Nothing implement here
}
}
diff --git a/source/net/yacy/kelondro/workflow/InstantBusyThread.java b/source/net/yacy/kelondro/workflow/InstantBusyThread.java
index b5d48328f..7cbbcd51c 100644
--- a/source/net/yacy/kelondro/workflow/InstantBusyThread.java
+++ b/source/net/yacy/kelondro/workflow/InstantBusyThread.java
@@ -179,7 +179,17 @@ public final class InstantBusyThread extends AbstractBusyThread implements BusyT
public static WorkflowThread oneTimeJob(final Runnable thread, final long startupDelay, final int maxJobs) {
while (instantThreadCounter >= maxJobs) try {Thread.sleep(100);} catch (final InterruptedException e) {break;}
- return oneTimeJob( thread, startupDelay);
+ return oneTimeJob( thread, startupDelay);
+ }
+
+ @Override
+ public void open() {
+ // Not implemented in this thread
+ }
+
+ @Override
+ public synchronized void close() {
+ // Not implemented in this thread
}
}
diff --git a/source/net/yacy/search/index/DocumentMetadata.java b/source/net/yacy/search/index/DocumentMetadata.java
index cefeb8359..56f4f773f 100644
--- a/source/net/yacy/search/index/DocumentMetadata.java
+++ b/source/net/yacy/search/index/DocumentMetadata.java
@@ -50,7 +50,7 @@ public class DocumentMetadata implements Metadata {
}
@Override
- public void close() {
+ public synchronized void close() {
// TODO Auto-generated method stub
}
diff --git a/source/net/yacy/search/index/DocumentReference.java b/source/net/yacy/search/index/DocumentReference.java
index 51906c65e..0f2b7c1d1 100644
--- a/source/net/yacy/search/index/DocumentReference.java
+++ b/source/net/yacy/search/index/DocumentReference.java
@@ -42,7 +42,7 @@ public class DocumentReference {
return data.size();
}
- public void close() {
+ public synchronized void close() {
if (data != null) {
data.close();
}