Skip to content

gen: Support duplicate futures in WaitIterator - #3691

Open
Sanjays2402 wants to merge 1 commit into
tornadoweb:masterfrom
Sanjays2402:fix/wait-iterator-duplicate-future
Open

gen: Support duplicate futures in WaitIterator#3691
Sanjays2402 wants to merge 1 commit into
tornadoweb:masterfrom
Sanjays2402:fix/wait-iterator-duplicate-future

Conversation

@Sanjays2402

Copy link
Copy Markdown

WaitIterator stored unfinished inputs in a dict keyed by future, so passing the same future more than once collapsed its indices and the second completion raised KeyError. Keep a deque of indices for each future instead, preserving positional and keyword entries in input order.

Adds regression coverage for both constructor forms. Fixes #2029.

WaitIterator keyed each unfinished entry by Future, so repeated inputs
were collapsed and the second completion raised KeyError. Store all
indices for each Future and consume them in input order.

Add positional and keyword regression coverage.

Fixes tornadoweb#2029
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WaitIterator crashes if given the same future multiple times

1 participant