Skip to content

Commit 1f8cfae

Browse files
committed
VisionIpcClient: release GIL when receiving buffer
1 parent 94e7389 commit 1f8cfae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

msgq/visionipc/visionipc.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ cdef extern from "msgq/visionipc/visionipc_client.h":
5252
int num_buffers
5353
VisionBuf buffers[1]
5454
VisionIpcClient(string, VisionStreamType, bool, void*, void*)
55-
VisionBuf * recv(VisionIpcBufExtra *, int)
55+
VisionBuf * recv(VisionIpcBufExtra *, int) nogil
5656
bool connect(bool)
5757
bool is_connected()
5858
@staticmethod

msgq/visionipc/visionipc_pyx.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ cdef class VisionIpcClient:
144144
return self.extra.valid
145145

146146
def recv(self, int timeout_ms=100):
147-
buf = self.client.recv(&self.extra, timeout_ms)
147+
with nogil:
148+
buf = self.client.recv(&self.extra, timeout_ms)
148149
if not buf:
149150
return None
150151
return VisionBuf.create(buf)

0 commit comments

Comments
 (0)