Browse Source

Throw an RAII lock around the conveyor to avoid a race condition

dev v1.1.1
Mike 5 months ago
parent
commit
80253ebcb2
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      TextCanvas.py

+ 2
- 1
TextCanvas.py View File

@ -105,7 +105,8 @@ class TextCanvas:
# So far simply does maintenance once per second
while self.__conveyor_enabled is True:
self.__fps_samples.append(0)
with RAIILock(self.__lock):
self.__fps_samples.append(0)
time.sleep(1)


Loading…
Cancel
Save