-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
docsDocumentation improvementsDocumentation improvements
Description
Did I miss a way to test if the BBQueue is empty without actually pulling bytes?
If not, was there an architectural reason not to implement is_empty() on a Consumer?
Rationale for is_empty():
Sometimes I may want to check to see if there is something in the queue and then schedule the actual read for later/somewhere else. For example, I may want to set a flag in interrupt context or schedule a DMA sometime later.
Unfortunately, if I have to call read() I have to be ready in case the read comes back with a grant instead of InsufficientSize. Getting that grant to where it needs to be may not be very simple especially if the grant is only the first half of a read cut apart by inversion of the read/write pointers.
Thanks.
Metadata
Metadata
Assignees
Labels
docsDocumentation improvementsDocumentation improvements