atsushieno/mono-reactive — Issue #12: Delay seems to working incorrectly
Author: pixelmeister
Created: 2012-02-14 21:48:22+00:00
State: open

First, just wanted to say, awesome work! I am using your code under MonoTouch right now and a number of things do actually work. I'd like to be able to blog about it to others, but a test app I've done that duplicates the "As Time Flies" RX demo isn't working. It appears be be due to issue in Delay(). This program (which works on Windows with the system RX):

var source = Observable.Interval(TimeSpan.FromSeconds(1)).Timestamp();
var delayed = source.Delay(TimeSpan.FromSeconds(4)).Timestamp();
delayed.Subscribe(item => Debug.WriteLine("Datum {0}, Create on {1:ss} and propagate on {2:ss}", item.Value.Value, item.Value.Timestamp, item.Timestamp));

doesn't work on MonoTouch. I.e. it doesn't seem to delay and that's what I'm seeing in my demo app.

My demo app works aok with a version of the System.ReactiveExtensions.dll which I retargeted to MonoTouch. The retargeted version work well in AOT mode, but has other issues (JIT exceptions) than your code does as AOT seems to work more poorly in MonoTouch when using dlls versus build from source.

Note sure if you've tested Delay() much, but thought I'd bring up the issue. Note, I haven't had a chance to try to track down the bug yet.

Thanks,
Brad