When is Dobot Queue running?
Hello, I have a question about “Queue”.
I am curious about when the “Queue” is executed
First, the manual says that if you put a value of 0 in “isQueue”, it is executed immediately. It doesn’t run immediately.
for example
while True:
print("A")
dType.SetWAITCmd(api, 1000, 0)
dType.SetWAITCmd is a function that sets the waiting time between commands in the Queue".
My expected result is to print “A” every second
However, “A” is printed quickly, but after a certain amount of time elapses, “A” is printed once every second.
My expectation is that even if I put a value of 0 in “isQueue”, it seems to enter the first index of the “Queue”.
But I want conviction, not expectation.
The second question is that even if you put 1 in isQueue, the result value is the same as the code that put 0.
I want to know an example that shows the difference between the value of 1 and 0 in isQueue.
Third question, I know Queue is asynchronous processing.
In the example of the first question, the loop is processed asynchronously, but after a certain point, processing is performed synchronously.
I am wondering what logic is executed inside.