Skip to content

Instantly share code, notes, and snippets.

@imakecodes
Created November 21, 2019 18:43
Show Gist options
  • Save imakecodes/2b624f3dd3632e53e055fc2580ff9d9a to your computer and use it in GitHub Desktop.
Save imakecodes/2b624f3dd3632e53e055fc2580ff9d9a to your computer and use it in GitHub Desktop.
from threading import Thread
class QueryFuture(Thread):
def __init__(self, q):
self.q = q
super().__init__()
def run(self):
self.docs = presto.execute_response(self.q)
def run_query(q):
w = QueryFuture(q)
w.start()
return w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment