File tree Expand file tree Collapse file tree
src/DynamicData/List/Internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,21 +40,21 @@ private IObservable<IChangeSet<TDestination>> RunImpl()
4040 var state = new ChangeAwareList < Transformer < TSource , TDestination > . TransformedItemContainer > ( ) ;
4141 var asyncLock = new SemaphoreSlim ( 1 , 1 ) ;
4242
43- return _source . Select (
44- async changes =>
45- {
46- try
47- {
48- await asyncLock . WaitAsync ( ) . ConfigureAwait ( false ) ;
49- await Transform ( state , changes ) . ConfigureAwait ( false ) ;
50- return state ;
51- }
52- finally
43+ return _source . Select ( async changes =>
5344 {
54- asyncLock . Release ( ) ;
55- }
56- } ) . Select ( tasks => tasks . ToObservable ( ) ) . SelectMany ( items => items ) . Select (
57- transformed =>
45+ try
46+ {
47+ await asyncLock . WaitAsync ( ) ;
48+ await Transform ( state , changes ) ;
49+ return state ;
50+ }
51+ finally
52+ {
53+ asyncLock . Release ( ) ;
54+ }
55+ } )
56+ . Concat ( )
57+ . Select ( transformed =>
5858 {
5959 var changed = transformed . CaptureChanges ( ) ;
6060 return changed . Transform ( container => container . Destination ) ;
You can’t perform that action at this time.
0 commit comments