#NEWLINE# @ classmethod #NEWLINE# def query( cls , name , query_type ) : #NEWLINE# #INDENT# "Begin a DNS lookup. The result (or exception) will be in the\n        returned :class:`~gevent.event.AsyncResult` when it is available.\n\n        :param name: The DNS name to resolve.\n        :type name: str\n        :param query_type: The DNS query type, see\n                           :meth:`pycares.Channel.query` for options. A string\n                           may be given instead, e.g. ``'MX'``.\n        :rtype: :class:`~gevent.event.AsyncResult`\n\n        " #NEWLINE# result = AsyncResult ( ) #NEWLINE# query_type = cls . _get_query_type ( query_type ) #NEWLINE# cls . _channel = ( cls . _channel or cls . channel or pycares . Channel ( ) ) #NEWLINE# cls . _channel . query ( name , query_type , partial ( cls . _result_cb , result ) ) #NEWLINE# cls . _thread = ( cls . _thread or gevent . spawn ( query_type . _wait_channel ) ) #NEWLINE# return result