Closed stefanpenner closed 6 years ago
I actually wonder if it's conceptually necessary to tie the cancellation thing to the cleanup
function. In other words, I don't think there's any reason why in general we couldn't start a fresh build after canceling the current build, instead of cleaning up immediately. We shouldn't end up in any "wedged" state that would stop us from doing so.
So if we do that, the Ctrl+C handler would do something like:
cancelCurrentBuild()
then wait for currentBuild
then cleanup
@joliss i'll update this to be more like what I ended-up with on 0.18.x. There are some nuanced differences, that have not made it to this PR yet.
Some thoughts:
cancel
independent of cleanup is totally fine, will gladly add that. We can also make an non exceptional cancel recoverable.cancel()
cleanup()
and builder.build()
. I believe builder.build
completion must wait for any pending cleanup()
which in tern must wait for any pending cancel()
. That way the external world remains observably consistent, regardless if a build completes via rejection due to cancellation, due to error, or totally normal runtime.replaced by: https://github.com/broccolijs/broccoli/pull/350