Description
I request the DataOutputQueue
support maxSize=0
so that no data is retained in the internal std::queue
yet the callbacks continue to be called with the data.
I think the change is trivial and isolated to LockingQueue.hpp
. I can take on this work as it already has use potential in my app.
Setup
- all
Repro
By code review. LockingQueue::push()
and tryWaitAndPush()
don't behave appropriately when maxSize=0.
If maxSize=0, they would actually behave as if it was =1.
depthai-core/include/depthai/utility/LockingQueue.hpp
Lines 107 to 125 in c2ccafd
A one-line change to check for if (maxSize == 0) return true
would correct the behavior and support this feature request. I think true
is the appropriate return since this is not an error condition and the function would have placed the data into the queue. It just so happens that a maxSize=0 queue is a singularity with size 0... or like /dev/null.
And removing the one line check here