Skip to content

Commit

Permalink
Cancel running tasks on plugin reload.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Ermakov committed Dec 17, 2011
1 parent 1b90361 commit 6544c59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions external_command.py
Expand Up @@ -191,6 +191,10 @@ def on_done(task):
self.tasks[view.buffer_id()] = task
task.start()

def __del__(self):
for task in self.tasks.values():
task.cancel()


class ExternalCommandBase(object):
command_manager = ExternalCommandManager()
Expand Down

0 comments on commit 6544c59

Please sign in to comment.