Exemple #1
0
def removeDevice(value):
    lock.acquire()
    deviceDict.remove(value)
    lock.release()
Exemple #2
0
def saveDictionary():
    lock.acquire()
    with open('deviceDictionary.pickle', 'wb') as handle:
        pickle.dump(deviceDict, handle, protocol=pickle.HIGHEST_PROTOCOL)
    lock.release()
Exemple #3
0
def addDevice(key, value):
    lock.acquire()
    deviceDict[key] = value
    lock.release()