Skip to content

Commit

Permalink
Targeted .net 4.5.2 instead of 4.5.0 so xunit tests on both targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bronley Plumb committed Jul 17, 2018
1 parent ef022f6 commit d7c0d66
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Plumb.Cacher.Tests/Plumb.Cacher.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net45</TargetFrameworks>
<TargetFrameworks>netcoreapp2;net452</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp2.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
7 changes: 0 additions & 7 deletions Plumb.Cacher/Cache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ public async Task<T> ResolveAsync<T>(string key, Func<Task<T>> factory, int? mil
return factory();
});
var constructedCacheItem = new CacheItem(key, lazyCacheItemValue, millisecondsToLive);
//save the thread to the cache item so it can be terminated if need be
constructedCacheItem.ResolveThread = System.Threading.Thread.CurrentThread;
return constructedCacheItem;
}, LazyThreadSafetyMode.ExecutionAndPublication);
return lazyResult;
Expand Down Expand Up @@ -306,11 +304,6 @@ public async Task<T> ResolveAsync<T>(string key, Func<Task<T>> factory, int? mil
}
finally
{
//clear the thread reference so it can be freed up
if (cacheItem != null)
{
cacheItem.ResolveThread = null;
}
}

//add this item to the eviction keys list
Expand Down
6 changes: 0 additions & 6 deletions Plumb.Cacher/CacheItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ public object Value
/// </summary>
public bool ShouldBeDiscarded = false;

/// <summary>
/// The thread used when resolving the value in this item
/// </summary>
public Thread ResolveThread;


/// <summary>
/// The number of milliseconds that this cache item should live before being evicted from the cache
/// Null means infinite
Expand Down
2 changes: 1 addition & 1 deletion Plumb.Cacher/Plumb.Cacher.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard2.0</TargetFrameworks>
<PackageId>Plumb.Cacher</PackageId>
<Version>2.1.0</Version>
Expand Down

0 comments on commit d7c0d66

Please sign in to comment.