[3.12] gh-112182: Replace StopIteration with RuntimeError for future (GH-113220) (GH-123033)
When an `StopIteration` raises into `asyncio.Future`, this will cause a thread to hang. This commit address this by not raising an exception and silently transforming the `StopIteration` with a `RuntimeError`, which the caller can reconstruct from `fut.exception().__cause__` (cherry picked from commit 4826d52338396758b2d6790a498c2a06eec19a86) Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
M
Miss Islington (bot) committed
41090b7ba06f4b68249b825caf4d06560ed16d9c
Parent: 9f153a2
Committed by GitHub <noreply@github.com>
on 8/15/2024, 3:34:53 PM