diff --git a/briar-api/src/org/briarproject/api/db/DatabaseExecutor.java b/briar-api/src/org/briarproject/api/db/DatabaseExecutor.java index 3c0e44a73..22d04d015 100644 --- a/briar-api/src/org/briarproject/api/db/DatabaseExecutor.java +++ b/briar-api/src/org/briarproject/api/db/DatabaseExecutor.java @@ -10,7 +10,13 @@ import java.lang.annotation.Target; import com.google.inject.BindingAnnotation; -/** Annotation for injecting the executor for database tasks. */ +/** + * Annotation for injecting the executor for database tasks. + *
+ * The contract of this executor is that tasks are executed in the order
+ * they're submitted, tasks are not executed concurrently, and submitting a
+ * task will never block.
+ */
@BindingAnnotation
@Target({ FIELD, METHOD, PARAMETER })
@Retention(RUNTIME)
diff --git a/briar-core/src/org/briarproject/crypto/CryptoModule.java b/briar-core/src/org/briarproject/crypto/CryptoModule.java
index f0eb56f05..d7dd2fdb4 100644
--- a/briar-core/src/org/briarproject/crypto/CryptoModule.java
+++ b/briar-core/src/org/briarproject/crypto/CryptoModule.java
@@ -28,7 +28,7 @@ public class CryptoModule extends AbstractModule {
private final ExecutorService cryptoExecutor;
public CryptoModule() {
- // The queue is unbounded, so tasks can be dependent
+ // Use an unbounded queue
BlockingQueue