Skip to content

Commit fa5bbad

Browse files
committed
doc(sdk): Just highlight how important this lock is.
1 parent 9319f4f commit fa5bbad

File tree

1 file changed

+3
-1
lines changed
  • crates/matrix-sdk/src/event_cache

1 file changed

+3
-1
lines changed

crates/matrix-sdk/src/event_cache/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,9 @@ impl RoomEventCacheInner {
573573
// Make sure there's at most one back-pagination request.
574574
let _guard = self.pagination_lock.lock().await;
575575

576-
// Make sure the `RoomEvents` isn't updated while we are back-paginating.
576+
// Make sure the `RoomEvents` isn't updated while we are back-paginating. This
577+
// is really important, for example if a sync is happening while we are
578+
// back-paginating.
577579
let mut room_events = self.events.write().await;
578580

579581
// Check that the `token` exists if any.

0 commit comments

Comments
 (0)