Fix deadlock in SubstitutionGoal
We were relying on SubstitutionGoal's destructor releasing the lock, but if a goal is a top-level goal, the destructor won't run in a timely manner since its reference count won't drop to zero. So release it explicitly. Fixes #178.
This commit is contained in:
		
							parent
							
								
									7c7707638a
								
							
						
					
					
						commit
						29cde917fe
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -2852,6 +2852,7 @@ void SubstitutionGoal::finished()
 | 
				
			||||||
    worker.store.registerValidPath(info2);
 | 
					    worker.store.registerValidPath(info2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    outputLock->setDeletion(true);
 | 
					    outputLock->setDeletion(true);
 | 
				
			||||||
 | 
					    outputLock.reset();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    worker.store.markContentsGood(storePath);
 | 
					    worker.store.markContentsGood(storePath);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue