mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	issue3770: if SEM_OPEN is 0, disable the mp.synchronize module, rev. Nick Coghlan, Damien Miller
This commit is contained in:
		
							parent
							
								
									e563aa4383
								
							
						
					
					
						commit
						37040cdace
					
				
					 5 changed files with 37 additions and 0 deletions
				
			
		|  | @ -21,6 +21,17 @@ | |||
| from multiprocessing.util import Finalize, register_after_fork, debug | ||||
| from multiprocessing.forking import assert_spawning, Popen | ||||
| 
 | ||||
| # Try to import the mp.synchronize module cleanly, if it fails | ||||
| # raise ImportError for platforms lacking a working sem_open implementation. | ||||
| # See issue 3770 | ||||
| try: | ||||
|     from _multiprocessing import SemLock | ||||
| except (ImportError): | ||||
|     raise ImportError("This platform lacks a functioning sem_open" + | ||||
|                       " implementation, therefore, the required" + | ||||
|                       " synchronization primitives needed will not" + | ||||
|                       " function, see issue 3770.") | ||||
| 
 | ||||
| # | ||||
| # Constants | ||||
| # | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jesse Noller
						Jesse Noller