Skip to content

Commit 2002c70

Browse files
Set all queue maxsizes to 2
Seems to fix the freezing issue????
1 parent 6fd9cbc commit 2002c70

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

BabbleApp/algo_settings_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def __init__(self, widget_id: Tab, main_config: BabbleSettingsConfig, osc_queue:
125125

126126
self.cancellation_event = Event() # Set the event until start is called, otherwise we can block if shutdown is called.
127127
self.cancellation_event.set()
128-
self.image_queue = Queue(maxsize=1)
128+
self.image_queue = Queue(maxsize=2)
129129

130130

131131
def started(self):

BabbleApp/babbleapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def main():
9595
# Check to see if we have an ROI. If not, bring up ROI finder GUI.
9696

9797
# Spawn worker threads
98-
osc_queue: queue.Queue[tuple[bool, int, int]] = queue.Queue(maxsize=5)
98+
osc_queue: queue.Queue[tuple[bool, int, int]] = queue.Queue(maxsize=2)
9999
osc = VRChatOSC(cancellation_event, osc_queue, config)
100100
osc_thread = threading.Thread(target=osc.run)
101101
# start worker threads

BabbleApp/camera_widget.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ def __init__(self, widget_id: Tab, main_config: BabbleConfig, osc_queue: Queue):
5151
# Set the event until start is called, otherwise we can block if shutdown is called.
5252
self.cancellation_event.set()
5353
self.capture_event = Event()
54-
self.capture_queue = Queue(maxsize=1)
55-
self.roi_queue = Queue(maxsize=1)
54+
self.capture_queue = Queue(maxsize=2)
55+
self.roi_queue = Queue(maxsize=2)
5656

57-
self.image_queue = Queue(maxsize=1)
57+
self.image_queue = Queue(maxsize=2)
5858

5959
self.ransac = BabbleProcessor(
6060
self.config,
@@ -67,7 +67,7 @@ def __init__(self, widget_id: Tab, main_config: BabbleConfig, osc_queue: Queue):
6767
self.cam_id,
6868
)
6969

70-
self.camera_status_queue = Queue(maxsize=1)
70+
self.camera_status_queue = Queue(maxsize=2)
7171
self.camera = Camera(
7272
self.config,
7373
0,

BabbleApp/general_settings_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def __init__(self, widget_id: Tab, main_config: BabbleSettingsConfig, osc_queue:
155155

156156
self.cancellation_event = Event() # Set the event until start is called, otherwise we can block if shutdown is called.
157157
self.cancellation_event.set()
158-
self.image_queue = Queue(maxsize=1)
158+
self.image_queue = Queue(maxsize=2)
159159

160160

161161
def started(self):

0 commit comments

Comments
 (0)