eygraber
11/14/2025, 5:45 PMSnapshotStateList need to be guarded against concurrent modifications? e.g.
remember {
derivedStateOf {
// paging.items is a SnapshotStateList
paging.items.count { ... }
}
}
should I be copying the list before iterating over it in the derivedStateOf, or do the semantics of the snapshot system prevent that view of it from being modified concurrently?shikasd
11/14/2025, 7:44 PMshikasd
11/14/2025, 7:44 PMtoList on a snapshot state list is mostly free, since it just returns immutable view into the current listZach Klippenstein (he/him) [MOD]
11/17/2025, 8:47 PMeygraber
11/17/2025, 9:29 PMConcurrentModificationException thrown, but there's no guarantee on what view of the data you'd have?