diff --git a/Rx.NET/Source/src/System.Reactive/Concurrency/SynchronizationContextScheduler.cs b/Rx.NET/Source/src/System.Reactive/Concurrency/SynchronizationContextScheduler.cs index bce28477be..3c00774b1a 100644 --- a/Rx.NET/Source/src/System.Reactive/Concurrency/SynchronizationContextScheduler.cs +++ b/Rx.NET/Source/src/System.Reactive/Concurrency/SynchronizationContextScheduler.cs @@ -93,7 +93,8 @@ public override IDisposable Schedule(TState state, TimeSpan dueTime, Fun return Schedule(state, action); } - return DefaultScheduler.Instance.Schedule((scheduler: this, action, state), dt, (_, tuple) => tuple.scheduler.Schedule(tuple.state, tuple.action)); + // Note that avoiding closure allocation here would introduce infinite generic recursion over the TState argument + return DefaultScheduler.Instance.Schedule(state, dt, (_, state1) => Schedule(state1, action)); } } }