mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	bpo-40513: new_interpreter() init GIL earlier (GH-19942)
Fix also code to handle init_interp_main() failure.
This commit is contained in:
		
							parent
							
								
									e838a9324c
								
							
						
					
					
						commit
						0dd5e7a718
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		|  | @ -1575,6 +1575,11 @@ new_interpreter(PyThreadState **tstate_p, int isolated_subinterpreter) | |||
|     } | ||||
|     interp->config._isolated_interpreter = isolated_subinterpreter; | ||||
| 
 | ||||
|     status = init_interp_create_gil(tstate); | ||||
|     if (_PyStatus_EXCEPTION(status)) { | ||||
|         goto error; | ||||
|     } | ||||
| 
 | ||||
|     status = pycore_interp_init(tstate); | ||||
|     if (_PyStatus_EXCEPTION(status)) { | ||||
|         goto error; | ||||
|  | @ -1585,11 +1590,6 @@ new_interpreter(PyThreadState **tstate_p, int isolated_subinterpreter) | |||
|         goto error; | ||||
|     } | ||||
| 
 | ||||
|     status = init_interp_create_gil(tstate); | ||||
|     if (_PyStatus_EXCEPTION(status)) { | ||||
|         return status; | ||||
|     } | ||||
| 
 | ||||
|     *tstate_p = tstate; | ||||
|     return _PyStatus_OK(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner