parent
a1c23b63a2
commit
d976af7f5a
|
@ -8,6 +8,7 @@ from getmac import get_mac_address
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
from multiprocessing import Process, Value
|
from multiprocessing import Process, Value
|
||||||
|
import multiprocessing
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@ -154,7 +155,8 @@ def tube_index_updater(shared_mem):
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
tube_index_smem = Value(None)
|
multiprocessing.set_start_method("fork")
|
||||||
|
tube_index_smem = Value("tube_index", "placeholder")
|
||||||
ti_updater_thread = Process(target=tube_index_updater, args=(tube_index_smem))
|
ti_updater_thread = Process(target=tube_index_updater, args=(tube_index_smem))
|
||||||
ti_updater_thread.start()
|
ti_updater_thread.start()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
Loading…
Reference in New Issue