You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typically, if an exception is thrown inside of an action/function invoked by hpx::async, the exception is stored in the shared state of the future and reported when the user calls .get() on the future (it is either rethrown or stored in the user-supplied hpx::error_code).
However, if the user does not call .get() on the future, the exception will not be reported (see testcase). I believe this is very dangerous behavior, because I don't believe most users would expect this - it's a "gotcha".
I had an issue with this today, and I only found out about the exception by going through the logs.
I think that we must abort if a future is being destroyed and it has an exception that has never been retrieved. Simply logging (even at the error log level) is not sufficient. Obviously we can't throw from the future dtor.
The text was updated successfully, but these errors were encountered:
Typically, if an exception is thrown inside of an action/function invoked by
hpx::async
, the exception is stored in the shared state of the future and reported when the user calls.get()
on the future (it is either rethrown or stored in the user-suppliedhpx::error_code
).However, if the user does not call
.get()
on the future, the exception will not be reported (see testcase). I believe this is very dangerous behavior, because I don't believe most users would expect this - it's a "gotcha".I had an issue with this today, and I only found out about the exception by going through the logs.
I think that we must abort if a future is being destroyed and it has an exception that has never been retrieved. Simply logging (even at the error log level) is not sufficient. Obviously we can't throw from the future dtor.
The text was updated successfully, but these errors were encountered: