File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
firebase-firestore/src/main/java/com/google/firebase/firestore Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -363,12 +363,18 @@ Task<Void> shutdown() {
363
363
}
364
364
365
365
/**
366
- * Waits until all pending writes that existed at the time of calling have been successfully
367
- * written to the server .
366
+ * Waits until all currently pending writes for the active user have been acknowledged by the
367
+ * backend .
368
368
*
369
- * @return A {@code Task} which resolves when all pending writes are written to the backend. If
370
- * there is a Firebase user change, the returned {@code Task} will resolve to an exception. If
371
- * the client is offline, the returned {@code Task} will not resolve.
369
+ * <p>The returned Task completes immediately if there are no outstanding writes. Otherwise, the
370
+ * Task waits for all previously issued writes (including those written in a previous app
371
+ * session), but it does not wait for writes that were added after the method is called. If you
372
+ * wish to wait for additional writes, you have to call `waitForPendingWrites()` again.
373
+ *
374
+ * <p>Any outstanding `waitForPendingWrites()` Tasks are cancelled during user changes.
375
+ *
376
+ * @return A {@code Task} which resolves when all currently pending writes have been acknowledged
377
+ * by the backend.
372
378
*/
373
379
Task <Void > waitForPendingWrites () {
374
380
return client .waitForPendingWrites ();
You can’t perform that action at this time.
0 commit comments