How it works...

While there is a start method to make threads run, surprisingly there isn't really an equivalent stop method.

In this recipe, we are running a method in a thread, which prints numbers to our ScrolledText widget.

When we exit our GUI, we are no longer interested in the thread that used to print to our widget, so by turning the thread into a daemon, we can exit our GUI cleanly.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.189.199