tkinter: call root.after from a thread?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Benjamin Rutt

    #1

    tkinter: call root.after from a thread?

    Let's say we have

    root = Tk()
    .... <layout gui, spawn thread etc....>
    root.mainloop()

    Is a safe to call the method root.after(...) from a separate thread?
    (The registered callback updates the GUI). I know you're supposed to
    avoid calling methods such as pack(), etc. from a thread, but I was
    wondering if calling root.after() would be safe? I'm doing this in a
    GUI without any problems, so far. Thanks,
    --
    Benjamin Rutt
Working...