I just discovered SubscribeOn, which makes me wonder if I should be using that instead of ObserveOn. Google took me here and here, but neither have helped me grok the difference: it seems incredibly subtle.
(In my context, I’ve got events ‘coming up’ on a non-gui thread, and I need to switch over to a gui thread before using the event data to update controls).
I had a similar problem a while back and asked this question about it. I think the responses (including the comments) there will answer your question. To summarize:
ObserveOn. If you referenceSystem.Reactive.Windows.Forms.dllyou get the.ObserveOn(form)which is handy.SubscribeOncontrols the thread on which the actual call to subscribe happens. The problem solved here is that WinForms and WPF will throw exceptions if you add event handlers from multiple different threads.Also, this post was very helpful in figuring out the relationship between
ObserveOnandSubscribeOn.