Time travel and testing and threads are hard in reactive programming (Rx)!
I've been slowly converting the memory model to be a lot more efficient (still to be seen if that works), but testing, and getting a set of tests that work has wasted a lot more time than I should have! It has me wondering, actually, if this isn't the right way to do things - or perhaps I should be moving back to something else not involving Rx programming. On the other hand, having everything hanging off the ctor is just so clean!
The main problem seems to be time travel. Rx has some nice things like a test scheduler which helps a lot with testing in Rx and time. You can put in a delay, and then use the scheduler to release the delay when you want. Sweet.
The problem comes when you start involving multiple threads and SemaphoreSlim's... at some point it seems like the test scheduler just stops working [I didn't try to debug it itself]. Rather, I switched all the tests to use the normal schedulers and found other ways to record what was going on, and make sure the testing was being done right.
I've not seen much about this on stack overflow.
This feels a bit like Rx works on small projects, but when you collect it into something large like this... Or I am not really using it right.














