pre-commit run --all-files

This commit is contained in:
Remi Cadene
2024-09-25 11:36:08 +02:00
parent 886923a890
commit 1bf284562e

View File

@@ -219,9 +219,9 @@ class OpenCVCamera:
self.camera = None self.camera = None
self.is_connected = False self.is_connected = False
self.thread = None self.thread = None
# Using Lock to avoid race condition and segfault when multiple threads # Using Lock to avoid race condition and segfault when threads access the
# access the same camera. This is not one of our use case, but we add this # same camera. Though not currently a use case for LeRobot, lock ensures
# for safety if users want to use this class with threads. As a result, threads # safety if users want to use this class with threads. As a result, threads
# will go sequentially through the code logic protected by a lock, instead of # will go sequentially through the code logic protected by a lock, instead of
# in parallel. Also, we use Recursive Lock to avoid deadlock by allowing each # in parallel. Also, we use Recursive Lock to avoid deadlock by allowing each
# thread to acquire the lock multiple times. # thread to acquire the lock multiple times.