I’m writing a physics simulating program, and found after() useful.
I once would like to create a thread for physics calculation and simulation. But when I finally noticed that function, I used it instead.
So, I’m curious about how Tkinter implements that function. Is it multi-threading?
It is not multithreaded.
Tkinter works by pulling objects off of a queue and processing them. Usually what is on this queue are events generated by the user (mouse movements, button clicks, etc).
This queue can contain other things, such as job created with
after. So, to Tkinter, something submitted withafteris just another event to be processed at a particular point in time.