fix restricted async python3 contextmanager syntax

This commit is contained in:
Peder Bergebakken Sundt 2021-08-19 22:45:33 +02:00
parent 904209587d
commit d4a3365343

View File

@ -87,7 +87,7 @@ class MPVControl:
pass
async def send_request(self, msg):
with await self.request_lock:
async with self.request_lock:
# Note: If asyncio.Lock is FIFO, the put can be moved out of the
# critical section. If await is FIFO, the lock is unnessesary. This
# is the safest option.