Skip to content

Commit

Permalink
Breaking change that requires different usage for projects targeting …
Browse files Browse the repository at this point in the history
…frameworks prior to .NET 5.0 in order to cater for potential thread aborts.
  • Loading branch information
MarkCiliaVincenti committed Sep 7, 2024
1 parent 794850f commit 01864c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
<PackageProjectUrl>https://github.com/MarkCiliaVincenti/Backport.System.Threading.Lock</PackageProjectUrl>
<Copyright>MIT</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<PackageIcon>logo.png</PackageIcon>
<PackageReleaseNotes>Breaking change that requires different usage for projects targeting frameworks prior to .NET 5.0 in order to cater for potential thread aborts.</PackageReleaseNotes>
<Description>A micro-library that backports .NET 9.0+'s System.Threading.Lock to prior framework versions (from .NET Framework 3.5 up to .NET 8.0), providing as much backward compatibility as possible.</Description>
<Copyright>© 2024 Mark Cilia Vincenti</Copyright>
<PackageTags>System.Threading.Lock,lock,backport,backward,compatible,compatibility,synchronization,synchronisation</PackageTags>
<RepositoryType>git</RepositoryType>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<AssemblyVersion>2.0.1.0</AssemblyVersion>
<FileVersion>2.0.1.0</FileVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IsPackable>true</IsPackable>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
Expand Down
9 changes: 2 additions & 7 deletions Backport.System.Threading.Lock/PreNet5Lock.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#if !NET9_0_OR_GREATER
using System;
using System;
using System.Runtime.CompilerServices;
using System.Threading;
#if NET9_0_OR_GREATER
[assembly: TypeForwardedTo(typeof(System.Threading.Lock))]
#endif
namespace Backport.System.Threading;
/// <summary>
/// A backport of .NET 9.0+'s System.Threading.Lock. Provides a way to get mutual exclusion in regions of code between different threads.
Expand Down Expand Up @@ -150,5 +146,4 @@ public ref struct Scope(Lock @lock)
#endif
public readonly void Dispose() => @lock.Exit();
}
}
#endif
}

0 comments on commit 01864c0

Please sign in to comment.