def print_timer(threadName): if exitFlag: threadName.exit() tensorLock.acquire() print("Success2") ic.main('Cropped11.jpg') tensorLock.release()
def run_tensoflow(threadName,image_file): if exitFlag: threadName.exit() tensorLock.acquire() print("Lock acq by " + str(threadName)) itemDetected=ic.main(image_file) foodItems.append(itemDetected) tensorLock.release()
def run_tensoflow(threadName,image_file): if exitFlag: threadName.exit() tensorLock.acquire() print("Lock acq by " + str(threadName)) itemDetected=ic.main(image_file) foodItems.append(itemDetected) tensorLock.release() #Lock to ensure synchronization tensorLock = threading.Lock() exitFlag = 0 import data_present as dat foodItems = []