Added the ability to cancel a computation without crashing or leaking resources. Closes #14.