parameters: (self)
docstring: Wake up main thread.
  
          The server usually waits in select call in we should terminate one.
          The simplest way is using socketpair.
  
          Select always wait to read from the first socket of socketpair.
  
          In this case, we can just write anything to the second socket from
          socketpair.
docstring_summary: Wake up main thread.
docstring_tokens: Wake up main thread .
function: def wake_up(self):
          """Wake up main thread.
  
          The server usually waits in select call in we should terminate one.
          The simplest way is using socketpair.
  
          Select always wait to read from the first socket of socketpair.
  
          In this case, we can just write anything to the second socket from
          socketpair.
          """
          self._write.send(b'1')
function_tokens: def wake_up ( self ) : self . _write . send ( b'1' )