original_docstring: r"""Operations performed on comm at exit including draining receive.
          
          Args:
              comm (CommBase): Communication object.
  
          
docstring: r"""Operations performed on comm at exit including draining receive.
docstring_tokens: r " " " Operations performed on comm at exit including draining receive .
code: def comm_atexit(cls, comm):  # pragma: no cover
          r"""Operations performed on comm at exit including draining receive.
          
          Args:
              comm (CommBase): Communication object.
  
          """
          if comm.direction == 'recv':
              while comm.recv(timeout=0)[0]:
                  comm.sleep()
          else:
              comm.send_eof()
              comm.linger()
          if not getattr(comm, 'dont_backlog', True):
              comm.linger_close()
code_tokens: def comm_atexit ( cls , comm ) : if comm . direction == 'recv' : while comm . recv ( timeout = 0 ) [ 0 ] : comm . sleep ( ) else : comm . send_eof ( ) comm . linger ( ) if not getattr ( comm , 'dont_backlog' , True ) : comm . linger_close ( )
short_docstring: r"""Operations performed on comm at exit including draining receive.
short_docstring_tokens: r " " " Operations performed on comm at exit including draining receive .
comment: # pragma: no cover$SEP$r"""Operations performed on comm at exit including draining receive.
          
          Args:
              comm (CommBase): Communication object.
  
          """