Пример #1
0
 public static IObservable <(K, Change <V>)> OnEntryChange <K, V>(this AtomHashMap <K, V> atom) =>
Пример #2
0
 public static IObservable <HashMapPatch <K, V> > OnChange <K, V>(this AtomHashMap <K, V> atom) =>
 Observable.FromEvent <HashMapPatch <K, V> >(
     add => atom.Change    += new AtomHashMapChangeEvent <K, V>(add),
     remove => atom.Change -= new AtomHashMapChangeEvent <K, V>(remove));
Пример #3
0
 public static IObservable <HashMapPatch <EqK, K, V> > OnChange <EqK, K, V>(
     this AtomHashMap <EqK, K, V> atom)
     where EqK : struct, Eq <K> =>
 Observable.FromEvent <HashMapPatch <EqK, K, V> >(
     add => atom.Change    += new AtomHashMapChangeEvent <EqK, K, V>(add),
     remove => atom.Change -= new AtomHashMapChangeEvent <EqK, K, V>(remove));
Пример #4
0
 static STM()
 {
     state       = AtomHashMap <EqLong, long, RefState>();
     transaction = new AsyncLocal <Transaction>();
 }