temporalio / sdk-dotnet

Temporal .NET SDK
MIT License
375 stars 30 forks source link

Confirmation that SemaphoreSlim can be used in workflows #285

Closed cretz closed 2 months ago

cretz commented 2 months ago

What was changed

Added test for SemaphoreSlim which shows what works and what doesn't

Checklist

  1. Relates to #281 (will be closed via a sample separately)
cretz commented 2 months ago

This is annoying to use because you have to use only WaitAsync and not with timeout and probably not even with cancellation token. And it is disposable which is confusing for workflows to implement. So while we will still keep these tests to confirm behavior, I think we're going to write our own semaphore impl.

cretz commented 2 months ago

I am closing this PR. I will be opening a separate one that contains a new Semaphore implementation