Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,6 @@ private void Tick(Action<SchedulePeriodicStopwatch<TState>, TimeSpan> recurse)

while (true)
{
var shouldWaitForResume = false;

lock (_gate)
{
if (_runState == RUNNING)
Expand Down Expand Up @@ -430,7 +428,6 @@ private void Tick(Action<SchedulePeriodicStopwatch<TState>, TimeSpan> recurse)
// will pick up the cumulative inactive time delta.
//
Debug.Assert(_runState == SUSPENDED);
shouldWaitForResume = true;
}

//
Expand All @@ -440,10 +437,7 @@ private void Tick(Action<SchedulePeriodicStopwatch<TState>, TimeSpan> recurse)
// be extremely unlucky to find ourselves SUSPENDED again and be blocked
// once more.
//
if (shouldWaitForResume)
{
_resumeEvent.WaitOne();
}
_resumeEvent.WaitOne();
}

recurse(this, next);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static partial class Scheduler
internal static Type[] OPTIMIZATIONS = {
typeof(ISchedulerLongRunning),
typeof(IStopwatchProvider),
typeof(ISchedulerPeriodic),
typeof(ISchedulerPeriodic)
/* update this list if new interface-based optimizations are added */
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ public void OnNext(TSecond value)
else if (_other.Done)
{
_parent.ForwardOnCompleted();
return;
}
}
}
Expand Down
44 changes: 8 additions & 36 deletions Rx.NET/Source/src/System.Reactive/Linq/Observable/SelectMany.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,12 @@ public override void OnNext(TSource value)
return;
}

try
using (e)
{
var hasNext = true;

while (hasNext)
{
hasNext = false;
var current = default(TResult);

try
Expand All @@ -420,13 +420,6 @@ public override void OnNext(TSource value)
}
}
}
finally
{
if (e != null)
{
e.Dispose();
}
}
}
}
}
Expand Down Expand Up @@ -488,13 +481,13 @@ public override void OnNext(TSource value)
return;
}

try
using (e)
{
var eIndex = 0;
var hasNext = true;

while (hasNext)
{
hasNext = false;
var current = default(TResult);

try
Expand All @@ -517,13 +510,6 @@ public override void OnNext(TSource value)
}
}
}
finally
{
if (e != null)
{
e.Dispose();
}
}
}
}
}
Expand Down Expand Up @@ -1367,12 +1353,12 @@ public override void OnNext(TSource value)
return;
}

try
using (e)
{
var hasNext = true;

while (hasNext)
{
hasNext = false;
var current = default(TResult);

try
Expand All @@ -1395,13 +1381,6 @@ public override void OnNext(TSource value)
}
}
}
finally
{
if (e != null)
{
e.Dispose();
}
}
}
}
}
Expand Down Expand Up @@ -1457,12 +1436,12 @@ public override void OnNext(TSource value)
return;
}

try
using (e)
{
var hasNext = true;

while (hasNext)
{
hasNext = false;
var current = default(TResult);

try
Expand All @@ -1485,13 +1464,6 @@ public override void OnNext(TSource value)
}
}
}
finally
{
if (e != null)
{
e.Dispose();
}
}
}
}
}
Expand Down