Skip to content

Warning - Using queue classes when Queue is empty  #4

@acgennari

Description

@acgennari

The library QueueArray.h doesn't handle properly the status of "Empty Queue".
When the queue is empty if you try to "queue.dequeque()" or "queue.front()" the system fails ... I can't tell how, but the Arduino controller behavior becomes unpredictable and unstable.
Yes ... it's easy to implement an IF check " ... if ( queue.count() > 0 ) { ... " but is not documented and for a beginner takes time to understand ... debug ... and workaround the issue.
Thanks for your attention
Regards
Andrea

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions