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

This commit is contained in:
mike committed 2020-08-02 07:12:36 -07:00
1 parent e8c4e012fd
commit 80253ebcb2
1 file changed
+1
+1
View File
@@ -105,6 +105,7 @@ class TextCanvas:
# So far simply does maintenance once per second # So far simply does maintenance once per second
while self.__conveyor_enabled is True: while self.__conveyor_enabled is True:
with RAIILock(self.__lock):
self.__fps_samples.append(0) self.__fps_samples.append(0)
time.sleep(1) time.sleep(1)