mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-06 09:50:55 +08:00
The class carried an ``asyncio.Lock`` that nothing ever acquired — every method here is sync, so it could not be — which read as protection the store did not have. #926 then added a read-modify-write helper next to it, and the natural question was whether concurrent captures could lose one. They cannot, and the reason is worth writing down rather than re-deriving: DeepTutor serves from a single process with no worker fan-out, both capture routes call this store synchronously with no ``await`` between their read and their write, so the sequence holds the event loop end to end, and every write lands through an atomic replace. Replace the unused lock with that invariant, plus the two changes that would break it (``asyncio.to_thread``, multiple workers) so the next person adding either knows locking has to come first.