mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Add custom initializer argument to multiprocess.Manager*, courtesy of lekma
This commit is contained in:
		
							parent
							
								
									d56bab47f1
								
							
						
					
					
						commit
						7152f6d915
					
				
					 5 changed files with 50 additions and 6 deletions
				
			
		|  | @ -92,6 +92,9 @@ def __init__(self, processes=None, initializer=None, initargs=()): | |||
|             except NotImplementedError: | ||||
|                 processes = 1 | ||||
| 
 | ||||
|         if initializer is not None and not hasattr(initializer, '__call__'): | ||||
|             raise TypeError('initializer must be a callable') | ||||
| 
 | ||||
|         self._pool = [] | ||||
|         for i in range(processes): | ||||
|             w = self.Process( | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jesse Noller
						Jesse Noller