sdk-python icon indicating copy to clipboard operation
sdk-python copied to clipboard

Add tests of asyncio.Lock and asyncio.Semaphore usage

Open dandavison opened this issue 7 months ago • 0 comments

Fixes #554

Add tests confirming that asyncio.Lock and asyncio.Semaphore can be used in workflow code to control concurrency of coroutines (tasks spawned by the main coroutine, and update handlers).

The fact that these tests pass largely follows from the fact that our event loop implementation has functioning implementations of call_later() call_soon(), so these tests could alternatively be moved into the features repo, as part of a feature test confirming that all languages have mutex/semaphore primitives that can be used for this sort of workflow concurrency control.

dandavison avatar Jul 01 '24 11:07 dandavison