November 7th, 2012, 07:40 PM
Process running every second + a 2nd one to pull value
I am trying to have one timer going, executing code every second and updating the value of a variable. At the same time, I want to do an ad-hoc pull (via WSIG) of the value to bring it to the web.
Essentially I want the value of a variable updating constantly, but being able to pull it at a given time via another function (thread?).
What should my approach be?
Thanks in advance!
November 7th, 2012, 08:50 PM
I hope someone comes up with a good answer or explains that my answer is "good".
a = 0
more = True
semaphore = threading.Semaphore()
for i in range(8):
a = i
more = False
old = a
old = a
Last edited by b49P23TIvg; November 7th, 2012 at 09:07 PM.
[/code] are essential for python code and Makefiles!