mirror of
				https://github.com/FreeOpcUa/opcua-asyncio
				synced 2025-10-29 17:07:18 +08:00 
			
		
		
		
	Configure ThreadLoop to be daemon
Configuring a sync Client object and connecting it to an OPC-UA host will cause the calling script to hang on exit if disconnect() is not called. By setting the ThreadLoop to be a daemon resolves this issue.
This commit is contained in:
		 Eskild Schroll-Fleischer
					Eskild Schroll-Fleischer
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							3268568df3
						
					
				
				
					commit
					1cdbf483b8
				
			| @@ -34,7 +34,7 @@ class ThreadLoopNotRunning(Exception): | ||||
|  | ||||
| class ThreadLoop(Thread): | ||||
|     def __init__(self, timeout: Optional[float] = 120) -> None: | ||||
|         Thread.__init__(self) | ||||
|         Thread.__init__(self, daemon=True) | ||||
|         self.loop = None | ||||
|         self._cond = Condition() | ||||
|         self.timeout = timeout | ||||
|   | ||||
		Reference in New Issue
	
	Block a user