Closed nielstron closed 1 year ago
Are you planning to bring another PR with a sleep injection, or perhaps another solution (Event()?) ?
I am not sure what kind of solution would generalize best to all use cases. I wrote a simple version that sleeps for 1 second every iteration but can imagine cleaner/simpler/more general ways.
Not planned to make that a PR hence
The file writer thread is a 100% CPU usage while loop that checks for file changes. This is questionable already and might be improved by a sleep interjection, but this is for another PR.
This PR simply suggests that if the access mode to the DB is "r" = read-only, then we do not need to run this 100% CPU load thread anyways.