File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -292,7 +292,20 @@ StreamReader
292292
293293   .. method :: close() 
294294
295-       Invoke ``close() `` on the underlying transport (if one exists).
295+       Invoke ``close() `` on the underlying asyncio transport (if one exists).
296+ 
297+       Note: It is not necessary for code that is given an already
298+       instantiated :class: `StreamReader ` instance to call `close() `
299+       for the sake of cleaning up resources when it is done using
300+       it. Cleanup of the underlying transport is the
301+       reponsibility of the code that provided the
302+       :class: `StreamReader ` instance. This method exists purely to
303+       allow client code of APIs that hide the underlying transport to
304+       eagerly close the transport as a way to signal to the producer
305+       of the stream that the read side is shut down. In particular,
306+       when interacting with the standard out pipe of a sub-process.
307+       In other words, it is an error to not to call close() on
308+       :class: `StreamReader ` instance you've been given.
296309
297310
298311StreamWriter
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments