Skip to content

Commit

Permalink
Added some getters
Browse files Browse the repository at this point in the history
  • Loading branch information
jobe committed Feb 5, 2020
1 parent 7785138 commit 98fd590
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion raspend/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self, port=None, sharedDict=None):
# Event used for proper shutting down our threads.
self._shutdownFlag = threading.Event()

# A lock object for synchronizing access to data within acquistion handlers and the HTTP request handler.
# A lock object for synchronizing access to data within thread handlers and the HTTP request handler.
self._dataLock = threading.Lock()

def createWorkerThread(self, threadHandler, waitTimeout):
Expand Down Expand Up @@ -88,6 +88,21 @@ def updateSharedDict(self, other):
self._sharedDict.update(other)
return len(self._sharedDict)

def getSharedDict(self):
""" Returns a reference to the shared dictionary used inside of this instance of RaspendApplication.
"""
return self._sharedDict

def getShutdownFlag(self):
""" Returns a reference to the event object used for shutdown.
"""
return self._shutdownFlag

def getAccessLock(self):
""" Returns a reference to the lock object used for synchronizing access to the shared dictionary.
"""
return self._dataLock

def run(self):
""" Run the main loop of your application.
"""
Expand Down

0 comments on commit 98fd590

Please sign in to comment.