You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lock-free cache Watch (and Experimental Watcher) drop completion and errors #5
The cache and list ports of upstream reactivemarbles#1146/reactivemarbles#1147 are complete, but some operators outside those PRs still subscribe with a value handler only:
src/DynamicData/Cache/Internal/LockFreeObservableCache.csWatch(key): _changes.Subscribe(changes => ...) has no error or completion handler, although _changes completes on dispose and carries source errors. AsObservableCache(applyLocking: false).Watch(key) and WatchValue therefore never complete, and a source error goes to the default handler (rethrown on the producer thread in the System.Reactive flavor) instead of the subscriber. ObservableCache.Watch, its locking sibling, was fixed by the Make the cache operators honour the Rx observable contract reactivemarbles/DynamicData#1146 port.
src/DynamicData/Experimental/Watcher.cs (AsWatcher): same pattern; watchers never observe source errors or completion. Lower priority.
Suggested approach
Forward observer.OnError and observer.OnCompleted in LockFreeObservableCache.Watch; decide and document the terminal behavior of Watcher (forward to watched-value streams, or complete them) and implement it the same way.
Test idea
In src/DynamicData.Tests/Internal/CacheInfrastructureCoverageFixture.cs (which covers Watch values only): dispose a lock-free cache and assert Watch/WatchValue complete; fail the source and assert the error reaches the subscriber, not the producer. Run in both flavors.
Activity
End watches through their own subjects rather than a side channel
dwcullop commentedon Oct 13, 2026
@ViktorJannicke Thanks for finding these! If you find anymore, please file in the upstream repo so we can fix them.