-
Notifications
You must be signed in to change notification settings - Fork 64
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
cancel
is not synchronous
#41
Comments
Note that |
Note that I'm playing with test cases and fixes for this on a branch at https://github.com/fpco/async/tree/children_survive. I'll open a PR when it's ready. |
Do we want the additional guarantee that the thread has terminated? Perhaps... |
Ah, I had misunderstood the semantics of I really think
Using |
I'm more ambivalent about cancel, but I definitely think the current On Fri, Jul 8, 2016, 5:57 PM Francesco Mazzoli notifications@github.com
|
I think you're asking for
as a specification, right? And then This widens the possibility for uninterruptible deadlock, which worries me a bit. |
I'm not sure if we need any masking on that call, if an async exception arrives I'd be fine with the |
Expanding on what @snoyberg says, I think I'm asking for
so that this behavior is on by default on everything that uses I think the best path forward is to have
|
This is a workaround for simonmar/async#41, which we didn't expect to be closed soo fast. Still, using this might be less painful than updating async and its transitive dependencies in the docker image.
This is a workaround for simonmar/async#41, which we didn't expect to be closed soo fast. Still, using this might be less painful than updating async and its transitive dependencies in the docker image.
cancel
returning does not mean that thecancel
edAsync
has indeed been terminated, and this resulted in very surprising behavior in some parts of our codebase. This is due to the fact that there is no guarantee thatthrowTo
has reached the thread (and obviously that the thread has terminated) after it has returned.This means that when using
withAsync
, orrace
, orconcurrently
if one of the two threads throws an exception, the "late" thread will linger on past their invocation.Repro by @snoyberg :
running this script will result in
Many thanks to @kantp for finding out about this behavior.
The text was updated successfully, but these errors were encountered: