Tkinter: is event_generate safe from background thread?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Russell E. Owen

    Tkinter: is event_generate safe from background thread?

    In general, I thought one should not mess with Tkinter from a background
    thread. But Eric Brunel recently posted a clever suggestion that one
    could communicate from a background thread to the main thread using
    event_generate to create custom events. Very neat: it's direct and it
    saves polling. He said it works for him on Linux, Windows and Solaris.
    I'd love to use it in my code, but am wondering if it's truly safe, e.g.
    safe by design and likely to remain so?

    Also, are there any other things one can safely do with Tkinter from
    background threads (such as set variables)?

    -- Russell
Working...