Skip to content

await pending future#21

Open
makeroo wants to merge 2 commits into
hephex:masterfrom
makeroo:master
Open

await pending future#21
makeroo wants to merge 2 commits into
hephex:masterfrom
makeroo:master

Conversation

@makeroo

@makeroo makeroo commented Dec 20, 2023

Copy link
Copy Markdown

It's a possible solution for #2

When invoking the same cached func multiple times, if the future returned by the first call is still pending then wait for it instead of triggering a new call.

Note: do not cache errors. When the call fails, the future is removed from the cache.

Note 2: this behaviours should be customizable (ie. error handling, multiple calls, etc.)

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.

1 participant