Teaching history how to exit early on thread cancellation