I want to pull image from bunch of cameras two times per second. I see a lot of usage of "while True" loops for that, like this:
while True:
image = getimage()
action(image)
time.sleep(0.5)
But it doesn't feel correct for a system that should work 24/7.
Is it correct way to do such thing or it's better to use some sort of scheduler? In that case can you give an example?