code: def _start_pulse(self):
          
  
          def _pulse():
              start_time = time.time()
  
              while True:
                  data = json.dumps({"header": "pyblish-qml:server.pulse"})
  
                  if six.PY3:
                      data = data.encode("ascii")
  
                  try:
                      self.popen.stdin.write(data + b"\n")
                      self.popen.stdin.flush()
                  except IOError:
                      break
  
                  # Send pulse every 5 seconds
                  time.sleep(5.0 - ((time.time() - start_time) % 5.0))
  
          thread = threading.Thread(target=_pulse)
          thread.daemon = True
          thread.start()
docs: Send pulse to child process
  
          Child process will run forever if parent process encounter such
          failure that not able to kill child process.
  
          This inform child process that server is still running and child
          process will auto kill itself after server stop sending pulse
          message.