syncing from bl codebase. Seems to be only one additional concurrency guard in case the StreamingIterator is closed by a thread other than the one that initialized it.