Created
November 21, 2019 18:43
-
-
Save imakecodes/2b624f3dd3632e53e055fc2580ff9d9a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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