Semaphores for use with both threads and asyncio?
Discussions on Python.org
Semaphores for use with both threads and asyncio?
Hi! I’m currently adopting a program to use FT Python and went down a bit of a rabbit hole. The code bounds a shared resource with a semaphore, acquired from inside an asyncio event loop. With free threading, the code moves to a one-loop-per-thread shape. With each loop attempting to access the same resource, I can’t find a way to express “at most N of these process-wide” with what currently exists in the standard library. From my understanding, there are two existing primitives but neither ad...
0 comments
No comments yet.