If I call
Timer(.1, some_function, [some_arguments]).start()
multiple times, what exactly happens behind the scenes?
The source of our problem is ...
We have a method that's essentially:
def move(target):
force = calculateForce(target-getCurrentPosition())
if(force != 0)
setForce(force)
Timer(.1, moveCursor, [tx]).start()
else:
setForce(0)
After setting the force, we need to check after a certain amount of time whether it should be stopped. (This information is to/from an external physical device that doesn't fire events.)
There's weird issues in how much time this function is taking, and also we're getting "can't start new thread" errors after a certain amount of time.
This leads me to believe that Timer(...) does not reuse threads but creates a new one every time.
Combined with a belief that the library we're using isn't threadsafe, these errors would make some sense....