summaryrefslogtreecommitdiffstats
path: root/documentapi
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2020-09-30 18:32:04 +0200
committerJon Marius Venstad <venstad@gmail.com>2020-09-30 18:32:04 +0200
commit6792ae6918439c535ff518107ad17351bb27fed1 (patch)
treedac7b68cdc4bfddca03ae497919c4cc593264a80 /documentapi
parentdc4f51621c0c965f97459c8c7f19aa3062d41567 (diff)
Await advance from test thread to next arrive is in the intended phase
Diffstat (limited to 'documentapi')
-rw-r--r--documentapi/src/main/java/com/yahoo/documentapi/local/LocalDocumentAccess.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/local/LocalDocumentAccess.java b/documentapi/src/main/java/com/yahoo/documentapi/local/LocalDocumentAccess.java
index 90bf0bccfdd..6a0f2d6afc2 100644
--- a/documentapi/src/main/java/com/yahoo/documentapi/local/LocalDocumentAccess.java
+++ b/documentapi/src/main/java/com/yahoo/documentapi/local/LocalDocumentAccess.java
@@ -83,7 +83,8 @@ public class LocalDocumentAccess extends DocumentAccess {
* and awaits advance before sending each response, so the user can trigger these documents and responses.
* After the document or response is delivered, the thread arrives and awaits advance, so the user
* can wait until the document or response has been delivered. This also ensures memory visibility.
- * The visit sender thread deregisters when the whole visit is complete. Example usage:
+ * The visit sender thread deregisters when the whole visit is done; the async session threads after each operation.
+ * Example usage:
*
* <pre> {@code
* void testOperations(LocalDocumentAccess access) {
@@ -94,7 +95,7 @@ public class LocalDocumentAccess extends DocumentAccess {
* session.put(documentPut);
* session.get(documentId);
* // Operations wait for this thread to arrive at "phaser"
- * phaser.arrive(); // Let operations send their responses
+ * phaser.arriveAndAwaitAdvance(); // Let operations send their responses
* // "responses" may or may not hold the responses now
* phaser.arriveAndAwaitAdvance(); // Wait for operations to complete sending responses, memory visibility, etc.
* // "responses" now has responses from all previous operations