-
-
Notifications
You must be signed in to change notification settings - Fork 30
Theraot.Collections.ProxyObservable
Alfonso J. Ramos edited this page Nov 10, 2015
·
2 revisions
This class is simply a "hot observable" that delivers what it observes... That is, it implements both IObservable<T>
and IObserver<T>
by transfering what it gets from one interface to the other, with no internal cache.
The internal implementation uses SafeSet<T>
to keep the subscribed observers (which internally uses a Mapper<T>
). Although since SafeSet<T>
can only have each item once, it used Needle<T>
as middle man to allow the same observer to be subscribed multiple times.
By using SafeSet<T>
(which is a concurrent set) there is no need to lock on it to use it.