Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
Description
In investigating MB-31481 and looking back to MB-29541, it appears there are some fundamental issues with the usage of the flag Stream::itemsReady.
It initially appears that in certain edge cases the flag gets set incorrectly, and in my investigations it appears there may be some interpretation of use duality. Furthermore, it should be noted that checking the readyQ being empty is also an option but the itemsReady flag appears to be defined differently to that, but that definition is not clear.
I believe that if the usage of this flag can be clarified, the issues surrounding this would in turn be solved as well as giving a secure belief it is working as intended instead of currently assuming it is despite some odd cases.
I would initially suggest that an addition of code comments describing how itemsReady differs from the readyQ being empty, as well as it's intended use cases being better defined. This would then segue nicely into a small documentation update.