Throw an RAII lock around the conveyor to avoid a race condition
This commit is contained in:
parent
e8c4e012fd
commit
80253ebcb2
@ -105,7 +105,8 @@ 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:
|
||||||
|
|
||||||
self.__fps_samples.append(0)
|
with RAIILock(self.__lock):
|
||||||
|
self.__fps_samples.append(0)
|
||||||
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user