mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480)
This commit is contained in:
		
							parent
							
								
									3a9b2aae61
								
							
						
					
					
						commit
						d27a53fc02
					
				
					 3 changed files with 8 additions and 0 deletions
				
			
		|  | @ -689,6 +689,8 @@ def __init__(self, parties, action=None, timeout=None): | |||
|         default for all subsequent 'wait()' calls. | ||||
| 
 | ||||
|         """ | ||||
|         if parties < 1: | ||||
|             raise ValueError("parties must be > 0") | ||||
|         self._cond = Condition(Lock()) | ||||
|         self._action = action | ||||
|         self._timeout = timeout | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Clinton
						Clinton