public void RenderTicksNonReentrant() { var driver = new PipelineDriver(); bool firstInvocationCompleted = false; Node graph1 = new AnonymousNode(() => Assert.True(firstInvocationCompleted)); Task task = null; Node graph0 = new AnonymousNode(() => { task = driver.RenderTicks(new[] { graph1 }, tickCount: 1).ToTask(); Thread.Sleep(1000); firstInvocationCompleted = true; }); driver.RenderTicks(new[] { graph0 }).First(); task.Wait(); }
// Render a graph of anonymous int-returning nodes IObservable <int> RenderTicksAnonIntNodes(PipelineDriver driver, AnonIntNode startNode, int tick = 0, CancellationToken?token = null) { return(driver.RenderTicks(new[] { startNode }, token: token).Select(dic => dic[startNode.Outputs[0]].Size.Width)); }