Open Globegitter opened 10 years ago
This is because most of the operations are synchronous I believe.
Which means that the process exit handlers have to wait until the main thread is unlocked to run the cleanup task.
Ah ok, so this means that at least for the time being there is no simple workaround?
Correct, but I do think a fix is possible, just not a quick-fix.
When I hit Ctrl+C during a build (either build
or serve
) with current Broccoli on iojs 1.5 on Linux, it exits immediately. However it doesn't clean up tmp directories. I'd like to revisit the tmp cleanup logic when the upcoming API change is done, as it centralizes the tmp dir handling.
Getting back to the issue at hand, do you still see the "delayed exit" behavior on Mac? I actually don't remember ever seeing this problem myself, so perhaps it's platform-specific.
mid-build cancellation PR https://github.com/broccolijs/broccoli/pull/350 (forward port from ember-cli's fork) should address this.
This continues to be a surprising behavior, and something to talk around when introducing Broccoli to a new developer. Other build tool CLIs exit promptly on control-C... it would be ideal to catch up with the mainstream on this!
After running
broccoli serve
and hittingCtrl + C
to stop the command it takes ~30 seconds until the command actually finished and the shell is responsive again.All I did was cloning the sample app and running
broccoli serve
on that as-is.