Пример #1
0
 def close(self, blockUntilClosed = True):
     '''close may wait 1 second.'''
     Listener.close(self)
     if self.establish_connection_to_close_lock.acquire(False):
         if not blockUntilClosed:
             thread_start_new(self._connect_to_pipe_to_close_it, ())
         else:
             self._connect_to_pipe_to_close_it()
Пример #2
0
 def listen(self):
     self.startListening()
     self._threadId = 'running'
     self._threadId = thread_start_new(self.listenForConnections, ())