4 ms·
Oh, I see now. I thought he was talking about a computer language but he was actually talking about the English language. My bad. So are you saying that POLL w
by joas_coder 2y ago
Oh, I see now. I thought he was talking about a computer language but he was actually talking about the English language. My bad.
So are you saying that POLL was a bad choice of name because polling means "check if there is something available and if there is get it"?
What would be a better name? How about availableToFetch and fetch? Any other better idea?
I don't like remove because you are not actually removing the object from the ring.
- gpderetta 2y agopoll doesn't necessarily imply removing.
- joas_coder 2y agoIt 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()
- gpderetta 2y agoWhile 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.