File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -253,9 +253,11 @@ def shutdown(self, immediate=False):
253253        By default, gets will only raise once the queue is empty. Set 
254254        'immediate' to True to make gets raise immediately instead. 
255255
256-         All blocked callers of put() and get() will be unblocked. If 
257-         'immediate', unblock callers of join() regardless of the 
258-         number of unfinished tasks. 
256+         All blocked callers of put() and get() will be unblocked. 
257+ 
258+         If 'immediate', the queue is drained and unfinished tasks 
259+         is reduced by the number of drained tasks.  If unfinished tasks 
260+         is reduced to zero, callers of Queue.join are unblocked. 
259261        """ 
260262        self ._is_shutdown  =  True 
261263        if  immediate :
Original file line number Diff line number Diff line change @@ -236,9 +236,11 @@ def shutdown(self, immediate=False):
236236        By default, gets will only raise once the queue is empty. Set 
237237        'immediate' to True to make gets raise immediately instead. 
238238
239-         All blocked callers of put() and get() will be unblocked. If 
240-         'immediate', callers of join() are unblocked regardless of 
241-         the number of unfinished tasks. 
239+         All blocked callers of put() and get() will be unblocked. 
240+ 
241+         If 'immediate', the queue is drained and unfinished tasks 
242+         is reduced by the number of drained tasks.  If unfinished tasks 
243+         is reduced to zero, callers of Queue.join are unblocked. 
242244        ''' 
243245        with  self .mutex :
244246            self .is_shutdown  =  True 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments