class_docstr: Non-blocking server.
docstr: 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.
docstr_tok: ["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","."]
code: 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")
  
imports: import logging
  import select
  import socket
  import struct
  import threading
  from collections import deque
  from six.moves import queue
  from thrift.transport import TTransport
  from thrift.protocol.TBinaryProtocol import TBinaryProtocolFactory
label_desc: Use image node_id 4 for calling the TNonblockingServer obj's underlying member method code with example usage: obj.wake_up() without return types