Skip to content

Commit

Permalink
Semaphore
Browse files Browse the repository at this point in the history
Co-authored-by: Sean Feldman <[email protected]>
  • Loading branch information
ErikMogensen and SeanFeldman authored Feb 15, 2024
1 parent 030fb0a commit 9d28397
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ServiceBus/Helpers/CancelScheduledMessagesHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static async Task CancelScheduledMessages(ServiceBusHelper2 serviceBusHel
{
await semaphore.WaitAsync();
tasks.Add(CancelScheduledMessageWithLogAsync(sender, sequenceNumber, serviceBusHelper.WriteToLog)
.ContinueWith((t) => semaphore.Release()));
.ContinueWith((t, state) => ((SemaphoreSlim)state)?.Release()));
}

await Task.WhenAll(tasks);
Expand Down

0 comments on commit 9d28397

Please sign in to comment.