Skip to content

Instantly share code, notes, and snippets.

@wyojustin
Created May 1, 2017 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wyojustin/9d03cd4ea2d94e78252a8e1832d2ed1e to your computer and use it in GitHub Desktop.
Save wyojustin/9d03cd4ea2d94e78252a8e1832d2ed1e to your computer and use it in GitHub Desktop.
class updateDriverThread(threading.Thread):
... cut
def run(self):
while not self.stopped():
try:
self._wait.wait()
self._updating.clear()
self._driver._update(self._data)
self._data = []
self._wait.clear()
self._reading.set()
self._updating.set()
except Exception, e:
print e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment