We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the following code, the recovery continuation is never executed with the broken promise exception, instead, it is destructed.
#include <stlab/concurrency/future.hpp> #include <stlab/concurrency/immediate_executor.hpp> #include <stlab/concurrency/utility.hpp> #include <iostream> using namespace stlab; using namespace std; int main() { auto hold = []() { auto [promise, future]{ package<int(int)>(immediate_executor, [](int x){ return x; })}; return future ^ [](const auto& f) { try { auto answer = *f.get_try(); cout << "The answer is " << answer << '\n'; } catch (const exception& ex) { cout << "The error \"" << ex.what() << "\" happened!\n"; } }; }(); cout << "has exception:" << !!hold.exception() << endl; }
The broken promise code predates recovery continuations, the code should execute the recovery continuations before destruction.
The text was updated successfully, but these errors were encountered:
I will look into this.
Sorry, something went wrong.
@FelixPetriconi, do you have an ETA for this fix?
I have a fix inside a PR. I am waiting for a review.
Thanks!
Fixed in 1.5.5
FelixPetriconi
No branches or pull requests
In the following code, the recovery continuation is never executed with the broken promise exception, instead, it is destructed.
The broken promise code predates recovery continuations, the code should execute the recovery continuations before destruction.
The text was updated successfully, but these errors were encountered: