Have you worked through the potential race conditions here and in ``Task.kill``?  Just wondering whether they need to be atomic or whether nothing bad can happen if, e.g., ``killed`` gets set to ``true`` and then the thread is interrupted.