Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion msgq/visionipc/visionipc.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ cdef extern from "msgq/visionipc/visionipc_client.h":
int num_buffers
VisionBuf buffers[1]
VisionIpcClient(string, VisionStreamType, bool)
VisionBuf * recv(VisionIpcBufExtra *, int)
VisionBuf * recv(VisionIpcBufExtra *, int) nogil
bool connect(bool)
bool is_connected()
@staticmethod
Expand Down
5 changes: 4 additions & 1 deletion msgq/visionipc/visionipc_pyx.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ cdef class VisionIpcClient:
return self.extra.valid

def recv(self, int timeout_ms=100):
buf = self.client.recv(&self.extra, timeout_ms)
cdef cppVisionBuf * buf
# release the GIL, this can block for timeout_ms
with nogil:
buf = self.client.recv(&self.extra, timeout_ms)
if not buf:
return None
return VisionBuf.create(buf)
Expand Down
Loading