Files
DeepTutor/deeptutor
Bingxi Zhao (Frank) 49d8d1bd63 docs(book): state what actually makes BookStorage's writes safe
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.
2026-08-20 01:46:19 +08:00
..
2026-06-11 20:03:34 +08:00
2026-04-23 19:29:16 +08:00
2026-08-19 17:34:52 +08:00
2026-08-19 17:34:52 +08:00
2026-04-23 19:29:16 +08:00
2026-08-19 17:34:52 +08:00