Skip to content

Commit

Permalink
Merge pull request #105 from neonichu/do-not-spawn-after-cancellation
Browse files Browse the repository at this point in the history
Do not execute new processes anymore after cancel
  • Loading branch information
neonichu committed Feb 1, 2017
2 parents f456288 + e6e144e commit 4df9651
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/BuildSystem/LaneBasedExecutionQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ class LaneBasedExecutionQueue : public BuildExecutionQueue {
ArrayRef<StringRef> commandLine,
ArrayRef<std::pair<StringRef,
StringRef>> environment) override {
{
std::unique_lock<std::mutex> lock(readyJobsMutex);
// Do not execute new processes anymore after cancellation.
if (cancelled) {
return false;
}
}

// Assign a process handle, which just needs to be unique for as long as we
// are communicating with the delegate.
struct BuildExecutionQueueDelegate::ProcessHandle handle;
Expand Down

0 comments on commit 4df9651

Please sign in to comment.