Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is clear to me now that poll only removes if there is something to remove

A much better name would have been FETCH and not POLL

We'll be changing everything from poll to fetch in the next version => availableToFetch() and fetch()



While we are bikeshedding, what about peek() (returns the element, but doesn't dequeue), pop() (dequeue and return the element), try_peek(), try_pop() for the polling variants.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: