I think adding an event adds just a few lines of code and handles the race condition discussed offline (where a job submitted after the cancelStage() function gets called but before the JobCancellation() event gets processed won't be cancelled).  I'd create a StageCancelled event that this function calls, and then just move the body of the function to inside the DAGScheduler event loop in the StageCancelled case (and change the cancelJob() function to handleJobCancellation()).