Expose SemaphoreSlim.Acquire with CancellationToken

This commit is contained in:
2025-05-20 12:25:36 +02:00
parent bae28b2552
commit af1dfd6751
4 changed files with 14 additions and 3 deletions
@@ -8,4 +8,9 @@ public static class SemaphoreSlimExtensions
{
return await SemaphoreSlimContext.Create(semaphore);
}
public static async Task<SemaphoreSlimContext> Acquire(this SemaphoreSlim semaphore, CancellationToken cancellationToken)
{
return await SemaphoreSlimContext.Create(semaphore, cancellationToken);
}
}