Skip to content

Commit

Permalink
Ensure tasks are cancelled when executor is shut down (#2656)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater authored Jul 13, 2020
1 parent 27d1599 commit 1598dff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def execute(self, operations): # type: (Operation) -> int
self._shutdown = True

if self._shutdown:
# Cancelling further tasks from being executed
[task.cancel() for task in tasks]
self._executor.shutdown(wait=True)

break
Expand Down

0 comments on commit 1598dff

Please # to comment.