This should happen inside Sync somehow.  Probably you want to explicitly call some kind of `end` method on the sync instance, and it does a bunch of cleanup, shuts down the sync, emits the event, etc.  Internally, the Sync instance will know if it's been killed early or was done (e.g., has it finished doing all the steps yet, keep track of each step in a state or something on the instance).