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
Destroying a non-empty channel causes an assertion failure #2890
Comments
Note that calling |
Am 08.09.2017 11:19 vorm. schrieb "Element-126" <notifications@github.com>:
Note that calling ch.close() explicitly does not prevent the assertion
failure, although it does call receive_buffer<>::cancel_waiting(), which
should result in an empty buffer.
I think ultimately, the assertion is correct and should also fire on
closing the channel. It points to a potential programming error for not
consuming all received values.
`cancel_waiting` is the way out to explicitly express that you want to
discard the non received values.
With that being said, the documentation needs indeed some love and a
consensus on the semantics needs to be formed.
|
I almost certainly abused the semantics of For my current use case, I guess the right thing to do is to implement a new class dedicated to resource management and inspired from Otherwise, do you know if it is possible to directly call Once you are settled on the correct semantics of |
@Element-126 The intended mechanism for this is to call |
- this fixes #2890 - flyby: refactored HPX_GET_EXCEPTION macro to support lightweight exception creation
- this fixes #2890 - flyby: refactored HPX_GET_EXCEPTION macro to support lightweight exception creation
@Element-126 I have added a Boolean option to |
@hkaiser Thanks a lot ! I will pull your branch and try your fix today. |
@hkaiser The fix seems to be working. Thanks again ! |
I am not quite sure whether the following code is legit, but since it causes an assertion failure inside HPX, I am opening an issue anyway.
The above snippet, compiled with:
results on my system in:
I have looked at the
channel
documentation, and yet I have not figured out whether eachset()
should be accompanied by a correspondingget()
.If that is the case, then we could consider adding it to the documentation. Otherwise, it looks like a bug ;-)
The text was updated successfully, but these errors were encountered: