{"id":4682,"date":"2024-09-30T16:22:13","date_gmt":"2024-09-30T15:22:13","guid":{"rendered":"https:\/\/ibex.tech\/python\/?p=4682"},"modified":"2024-09-30T16:22:14","modified_gmt":"2024-09-30T15:22:14","slug":"threads-for-background-processes","status":"publish","type":"post","link":"https:\/\/ibex.tech\/python\/gui\/tkinter-tk-gui-toolkit\/threads-for-background-processes","title":{"rendered":"Threads for background processes"},"content":{"rendered":"\n<p>Tkinter is not thread safe, it needs to run on your applications main thread. However when you call root.mainloop() your application won&#8217;t do anything more until the GUI window gets closed. <\/p>\n\n\n\n<p>To do background tasks you create a new thread (or threads) to do them.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tkinter is not thread safe, it needs to run on your applications main thread. However when you call root.mainloop() your application won&#8217;t do anything more until the GUI window gets closed. To do background tasks you create a new thread (or threads) to do them.<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[349],"tags":[],"class_list":["post-4682","post","type-post","status-publish","format-standard","hentry","category-tkinter-tk-gui-toolkit"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/comments?post=4682"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4682\/revisions"}],"predecessor-version":[{"id":4683,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4682\/revisions\/4683"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/media?parent=4682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/categories?post=4682"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/tags?post=4682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}