fix: Don't bypass Dispatcher.InvokeAsync in OnDispatcher ext
Otherwise the updates may not be received in order
This commit is contained in:
1 parent
5303f290b1
commit
77083a1fa6
1 file changed
+1
-6
@@ -299,13 +299,8 @@ namespace System.Reactive.Linq {
|
||||
|
||||
return Observable.Create<T>(o => {
|
||||
return source.Subscribe(on_next);
|
||||
void on_next(T value) {
|
||||
if (dispatcher.CheckAccess()) {
|
||||
o.OnNext(value);
|
||||
return;
|
||||
}
|
||||
void on_next(T value) =>
|
||||
dispatcher.InvokeAsync(() => o.OnNext(value), priority);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user