SemaphoreSlim context

This commit is contained in:
2024-08-23 22:42:25 +02:00
parent 84a9f8e8d6
commit 00459fc59b
4 changed files with 37 additions and 2 deletions
@@ -0,0 +1,11 @@
using System.Threading;
using System.Threading.Tasks;
namespace System.Extensions;
public static class SemaphoreSlimExtensions
{
public static async Task<SemaphoreSlimContext> Acquire(this SemaphoreSlim semaphore)
{
return await SemaphoreSlimContext.Create(semaphore);
}
}