Async-based context manager that enforces FIFO processing
What is lockchain?
A LockChain allows you to create a chain of critical regions, executed sequentially. The underlying Lock from asyncio would actually enforce this with a dequeue, so this library is mostly unnecessary. Had I read the code first, I would have either not needed this or found a different solution. Until I actually think about it though, it’s still here.
It’s still useful for limiting access to some set of resources in a namespace. If no coroutine is blocking for some resource, it’s you may get to close that resource (or reset a rate limit.)