mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-20 05:24:57 +08:00
It came up with Nrwl that this is a common pattern; someone wants to schedule a target but does not want to manage the run himself. This function cancels the run when the Observable is unsubscribed from (which is not the case for a traditional run). Because stop logic can be asynchronous, we need to add a teardown logic handler to the context, which turns out to be useful for other cases as well.