I have a thread in while construction and I need to get data from it without any global vars. Is it possible to get data in real time without thread block or something? Please help.
def one():
while True:
a = data1
something gonna here with var b from thread two
def two():
while True:
b = a from thread one
something gonna here
def main():
th1 = Thread(target=one)
th2 = Thread(target=two)
th1.start()
th2.start()
something gonna here with var a and var b