3 ms·
How does this work? If I got multiple items, they're in an array. If such a reader blocks reads to an element until it's finished, I've won nothing if I have t
by k__ 6y ago
How does this work?
If I got multiple items, they're in an array. If such a reader blocks reads to an element until it's finished, I've won nothing if I have to wait until that array finished.
- Jtsummers 6y agoAs I said, you'd need some measure of concurrency. Or perhaps a non-blocking reader. Try to get new stuff, if it's not there continue on, I just don't like getting "null" responses like that as it's too close to a busy-loop which is, well, poor form. I generally write code that interacts with the world in its own thread/process/whatever so it doesn't block the rest of the system unless appropriate. The utility here is if you can process each element one at a time. If you need everything to get a meaningful result it offers no benefit to you.