class_docstr: Run ZAP authentication in a background thread
class_docstr_tok: ["Run","ZAP","authentication","in","a","background","thread"]
docstr: Start the authentication thread
docstr_tok: ["Start","the","authentication","thread"]
code: def start(self):
      """Start the authentication thread"""
      # create a socket to communicate with auth thread.
      self.pipe = self.context.socket(zmq.PAIR)
      self.pipe.linger = 1
      self.pipe.bind(self.pipe_endpoint)
      self.thread = AuthenticationThread(
          self.context,
          self.pipe_endpoint,
          encoding=self.encoding,
          log=self.log,
      )
      self.thread.start()
      # Event.wait:Changed in version 2.7: Previously, the method always returned None.
      if sys.version_info < (2, 7):
          self.thread.started.wait(timeout=10)
      else:
          if not self.thread.started.wait(timeout=10):
              raise RuntimeError("Authenticator thread failed to start")
  
imports: import time
  import logging
  from threading import Thread, Event
  import zmq
  from zmq.utils import jsonapi
  from zmq.utils.strtypes import bytes, unicode, b, u
  import sys
  from .base import Authenticator
label_desc: Use image node_id 9 for calling the ThreadAuthenticator obj's underlying member method code with example usage: obj.start() without return types