Home

Query runs forever when observable output is truncated by Dump

In LinqPad 5.22.02, a C# Expression query of
Observable.Interval(TimeSpan.Zero).Take(1001)
displays a result with 1001 rows, as expected.

With
Observable.Interval(TimeSpan.Zero).Take(1002)
the output is truncated at 1001 rows, the last row containing '(limit of graph)'. But I then see "Query continuing asycnhronously...", forever. Is this expected? I would have expected Dump to unsubscribe after it had consumed the 1001 rows it is going to display, and hence cause the query to terminate - just like it does if you add a .ToList() to the end.
Sign In or Register to comment.