зеркало из https://github.com/microsoft/Tx.git
Fix for SvcPerf hang due to not propagating the exeception
This commit is contained in:
Родитель
ff3a062800
Коммит
5db9afe29b
|
@ -5,5 +5,5 @@ using System.Reflection;
|
||||||
[assembly: AssemblyCompany("MS Open Tech")]
|
[assembly: AssemblyCompany("MS Open Tech")]
|
||||||
[assembly: AssemblyProduct("Tx (LINQ to Traces)")]
|
[assembly: AssemblyProduct("Tx (LINQ to Traces)")]
|
||||||
[assembly: AssemblyCopyright("Copyright © MS Open Tech 2012")]
|
[assembly: AssemblyCopyright("Copyright © MS Open Tech 2012")]
|
||||||
[assembly: AssemblyVersion("1.0.30926.0")]
|
[assembly: AssemblyVersion("1.0.30930.0")]
|
||||||
[assembly: AssemblyFileVersion("1.0.30926.0")]
|
[assembly: AssemblyFileVersion("1.0.30930.0")]
|
|
@ -0,0 +1,22 @@
|
||||||
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
namespace System.Reactive
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// This is like AnonimosObservable in Rx, but without the auto-detach logic
|
||||||
|
/// </summary>
|
||||||
|
public class NonDetachObservable<T> : IObservable<T>
|
||||||
|
{
|
||||||
|
Func<IObserver<T>, IDisposable> _subscribe;
|
||||||
|
|
||||||
|
public NonDetachObservable(Func<IObserver<T>, IDisposable> subscribe)
|
||||||
|
{
|
||||||
|
_subscribe = subscribe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IDisposable Subscribe(IObserver<T> observer)
|
||||||
|
{
|
||||||
|
return _subscribe(observer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -53,6 +53,7 @@
|
||||||
<Compile Include="IPlaybackConfiguration.cs" />
|
<Compile Include="IPlaybackConfiguration.cs" />
|
||||||
<Compile Include="ITypeMap.cs" />
|
<Compile Include="ITypeMap.cs" />
|
||||||
<Compile Include="CsvExtensions.cs" />
|
<Compile Include="CsvExtensions.cs" />
|
||||||
|
<Compile Include="NonDetachObservable.cs" />
|
||||||
<Compile Include="PullMergeSort.cs" />
|
<Compile Include="PullMergeSort.cs" />
|
||||||
<Compile Include="Pump.cs" />
|
<Compile Include="Pump.cs" />
|
||||||
<Compile Include="ITypeStatistics.cs" />
|
<Compile Include="ITypeStatistics.cs" />
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Reactive;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
@ -26,7 +27,7 @@ namespace Tx.Windows
|
||||||
if (etlFiles.Length == 0 || etlFiles.Length > 63)
|
if (etlFiles.Length == 0 || etlFiles.Length > 63)
|
||||||
throw new ArgumentException("the supported count of files is from 1 to 63");
|
throw new ArgumentException("the supported count of files is from 1 to 63");
|
||||||
|
|
||||||
return Observable.Create<EtwNativeEvent>(o => new EtwFileReader(o, etlFiles));
|
return new NonDetachObservable<EtwNativeEvent>(o => new EtwFileReader(o, etlFiles));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -39,7 +40,7 @@ namespace Tx.Windows
|
||||||
if (sessionName == null)
|
if (sessionName == null)
|
||||||
throw new ArgumentNullException("sessionName");
|
throw new ArgumentNullException("sessionName");
|
||||||
|
|
||||||
return Observable.Create<EtwNativeEvent>(o => new EtwListener(o, sessionName));
|
return new NonDetachObservable<EtwNativeEvent>(o => new EtwListener(o, sessionName));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче