Giter Club home page Giter Club logo

Comments (5)

SMFSW avatar SMFSW commented on July 17, 2024

Hello,

thanks for your interest about Queue library.

I did not have to deal with such behavior since the creation of the library, but it happened in the past.
I would even extend this enhancement to the whole queue by creating a method like peek_rec to peek any record in the queue (as you may also have to search in the whole queue for a duplicate record and making more sense for a LIFO implementation).

I think I could add a peek_previous() method as inline to do exactly what you want (for FIFO implementation).

I could also implement a method to drop any item in the queue, just because more peeking options would exist, but as I would like to keep the library straightforward and fluent as possible, I wouldn't plan to add these drop methods, only peeking on all records would be possible.

What do you think about it?

Thanks for giving thoughts about improving this library!

Regards,
SMFSW

from queue.

SMFSW avatar SMFSW commented on July 17, 2024

Changes made and exemples added...

Thanks for your thoughts/needs about enhancing this library, I (on behalf) of open source community thank you for it!

Just one thing before closing the issue, I would be really enjoying that you would test the changes and see if it fits your needs (using peekPrevious method) before tagging this new version...

Thanks a lot for the idea to improve this tiny library, making it more flexible to ones needs!
Really appreciated, kind regards,
SMFSW

from queue.

morcibacsi avatar morcibacsi commented on July 17, 2024

Thank you for the fast reply, and the generic implementation. I am going to test it and report back ASAP. Just please give me a few days. Thanks again for your work.

from queue.

morcibacsi avatar morcibacsi commented on July 17, 2024

Tested, and seems fine, closing the issue. Thanks for your patience.

from queue.

SMFSW avatar SMFSW commented on July 17, 2024

@morcibacsi Thanks a lot for enhancement proposal and tests!
New version is now tagged and should be available through Arduino library manager soon now.

from queue.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.