mirror of
https://github.com/storytold/AniCraft.git
synced 2026-11-28 17:19:31 +01:00
forget_pictures cleared the queue and the cache under two separate locks, and the worker read the cache's clear count only after it had taken a batch from the queue. A batch taken before the queue was cleared could therefore read the count after the cache was cleared, and its pictures of the forgotten document were kept. The cache is now cleared while the queue is held, and the worker reads the count while it still holds the queue, so a batch taken before a clear always sees the older count.