Can I/Should I use reactive extensions for this? Basically I have an ESB which I want to monitor for messages (which is essentially where my hot observable sits atop) , and I want to create a bunch of subscribers which will block/pause in the thread they are created in only when a certain condition is met and /or a timeout occurs.
I know I can achieve this with Tasks/TaskCompletionSource and a Cancellation token but I thought that RX seemed like a nice fit.
EDIT: The timeout is not on the observable but should be at the subscribers, where they can unsubscribe and dispose of themselves once a timeout/condition is met, which ever comes first.
EDIT 2: The subscriber(s) and the observable will likely be processed on different threads - but not necessarily. If using async/await on the subscriber I want to be able to pause/block execution where the subscriber is situated. Basically, signalling completion of some work
What I am after is leveraging subscriber lifetime managment so I dont have to do anything. IConnectableObservable seemed to offer some promise in this area.
Perhaps this is square peg, round hole territory.