コード例 #1
0
def print_timer(threadName):
    if exitFlag:
        threadName.exit()
    tensorLock.acquire()
    print("Success2")
    ic.main('Cropped11.jpg')
    tensorLock.release()
コード例 #2
0
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()
コード例 #3
0
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 = []