gh-120321: fix thread safety of concurrently iterating over async generators (#155025)