File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 4545
4646
4747# -- Runner definitions 
48- _has_interpreter_pool  =  sys .version_info  >=  (3 , 14 )
48+ _has_interpreter_pool  =  sys .version_info  >=  (3 , 14 ) and  hasattr (
49+     concurrent , "InterpreterPoolExecutor" 
50+ )
4951
5052if  _has_interpreter_pool :
5153    _default_executor  =  concurrent .InterpreterPoolExecutor   # type: ignore[misc,attr-defined] 
@@ -1034,10 +1036,10 @@ def _get_ncores(
10341036        import  mpi4py .futures 
10351037    if  with_ipyparallel  and  isinstance (ex , ipyparallel .client .view .ViewExecutor ):
10361038        return  len (ex .view )
1037-     elif  isinstance (ex , concurrent .ProcessPoolExecutor  |  concurrent .ThreadPoolExecutor ):
1038-         return  ex ._max_workers   # type: ignore[union-attr] 
10391039    elif  _has_interpreter_pool  and  isinstance (ex , concurrent .InterpreterPoolExecutor ):  # type: ignore[attr-defined] 
10401040        return  ex ._max_workers   # type: ignore[union-attr] 
1041+     elif  isinstance (ex , concurrent .ProcessPoolExecutor  |  concurrent .ThreadPoolExecutor ):
1042+         return  ex ._max_workers   # type: ignore[union-attr] 
10411043    elif  isinstance (ex , loky .reusable_executor ._ReusablePoolExecutor ):
10421044        return  ex ._max_workers   # type: ignore[union-attr] 
10431045    elif  isinstance (ex , SequentialExecutor ):
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments