@@ -59,11 +59,11 @@ class TestingHooks final {
59
59
* rely on any particular ordering. If a given callback is registered multiple
60
60
* times then it will be notified multiple times, once per registration.
61
61
*
62
- * The thread on which the callback occurs is unspecified; listeners should
63
- * perform their work as quickly as possible and return to avoid blocking any
64
- * critical work. In particular, the listener callbacks should *not* block or
65
- * perform long-running operations. Listener callbacks can occur concurrently
66
- * with other callbacks on the same and other listeners .
62
+ * The listener callbacks are performed synchronously in
63
+ * `NotifyOnExistenceFilterMismatch()`; therefore, listeners should perform
64
+ * their work as quickly as possible and return to avoid blocking any critical
65
+ * work. In particular, the listener callbacks should *not* block or perform
66
+ * long-running operations .
67
67
*
68
68
* The `ExistenceFilterMismatchInfo` reference specified to the callback is
69
69
* only valid during the lifetime of the callback. Once the callback returns
@@ -74,13 +74,16 @@ class TestingHooks final {
74
74
*
75
75
* @return an object whose `Remove()` member function unregisters the given
76
76
* callback; only the first invocation of `Remove()` does anything; all
77
- * subsequent invocations do nothing.
77
+ * subsequent invocations do nothing. Note that due to inherent race
78
+ * conditions it is technically possible, although unlikely, that callbacks
79
+ * could still occur _after_ unregistering.
78
80
*/
79
81
std::shared_ptr<api::ListenerRegistration> OnExistenceFilterMismatch (
80
82
ExistenceFilterMismatchCallback);
81
83
82
84
/* *
83
- * Invokes all currently-registered `OnExistenceFilterMismatch` callbacks.
85
+ * Invokes all currently-registered `OnExistenceFilterMismatch` callbacks
86
+ * synchronously.
84
87
* @param info Information about the existence filter mismatch.
85
88
*/
86
89
void NotifyOnExistenceFilterMismatch (const ExistenceFilterMismatchInfo&);
0 commit comments