-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moka::future::Cache::get_or_insert_with() panics if previously inserting task aborted #59
Comments
Thank you for reporting. I confirmed the issue and I think it is a bug. I will investigate and fix it. |
Hey @tatsuya6502 lmk if you think I could help here |
Hi @barkanido — Thank you for the offer. I will do this by myself because this one is a bit tricky to solve. I will need some experiments. |
…sk was aborted Add `WaiterGuard` to `future::value_initializer` which will ensure that the waiter will be removed when the enclosing future has been aborted. Fixes #59.
This issue will be fixed by PR #60. After merging the PR, I will start a release process for Moka v0.6.3. I will run a regular pre-release testing, which usually takes 2.5 hours, and If everything goes well, I will publish v0.6.3 to crates.io. |
Published v0.6.3 with the fix to crates.io. |
Wow, thanks for the super fast tournaround on this! Aside: It looks like in a web service it can still be a good idea to call |
When writing a web server, it appears that
hyper::Server
can abort tasks, if the requester has gone away.moka::future::Cache
does not like that and panics. Is this bug? Or is there a recommended way to deal with it?Minimized example:
Backtrace:
The text was updated successfully, but these errors were encountered: