In the vStreams example (of the C code) the infer
function spins up two threads - one to perform the write_to_device
and one to read_from_device
. Why is this mutli-threaded? Is it required that the output buffer be allocated and listening before the data can be written to the device? Or is it simply best practices?
Hey @nicholas.young
While multi-threading for write_to_device
and read_from_device
isn’t strictly required, it is recommended for most real-time applications, including AI inference on Hailo devices, to ensure smooth and efficient data processing. If performance and low latency are essential, it’s best to use separate threads.
Let me know if this helps or if you need further clarification!
Best Regards,
Omri