@@ -444,24 +444,14 @@ def process_result_item(self, result_item):
444444 # Process the received a result_item. This can be either the PID of a
445445 # worker that exited gracefully or a _ResultItem
446446
447- if isinstance (result_item , int ):
448- # Clean shutdown of a worker using its PID
449- # (avoids marking the executor broken)
450- assert self .is_shutting_down ()
451- p = self .processes .pop (result_item )
452- p .join ()
453- if not self .processes :
454- self .join_executor_internals ()
455- return
456- else :
457- # Received a _ResultItem so mark the future as completed.
458- work_item = self .pending_work_items .pop (result_item .work_id , None )
459- # work_item can be None if another process terminated (see above)
460- if work_item is not None :
461- if result_item .exception :
462- work_item .future .set_exception (result_item .exception )
463- else :
464- work_item .future .set_result (result_item .result )
447+ # Received a _ResultItem so mark the future as completed.
448+ work_item = self .pending_work_items .pop (result_item .work_id , None )
449+ # work_item can be None if another process terminated (see above)
450+ if work_item is not None :
451+ if result_item .exception :
452+ work_item .future .set_exception (result_item .exception )
453+ else :
454+ work_item .future .set_result (result_item .result )
465455
466456 def is_shutting_down (self ):
467457 # Check whether we should start shutting down the executor.
0 commit comments