title: tkinter optionmenu hangs when clicked if after_idle is called elsewhere in the program
body: <p>I have a GUI that processes messages serially as they arrive and get queued up by several websockets. This function sets up a callback to itself using after_idle to perpetuate the process, like so:</p>
  
  <pre><code> def process_queue(self, flush=False):
          '''
          Check for new messages in the queue periodically.
          Sets up callback to itself to perpetuate the process.
          '''
          if flush:
              while not self.queue.empty():
                  self.get_msg()
          else:
              self.get_msg()
              self.master.after_idle(self.process_queue)
  </code></pre>
  
  <p>I have an <code>OptionMenu</code> widget on the GUI, which hangs and causes the program to crash when it is clicked:</p>
  
  <pre><code>self.plotind = tk.StringVar()
  self.plotind.set('MACD')
  options = ['MACD']
  self.indopts = tk.OptionMenu(self.analysis_frame, self.plotind, *[option for option in options])
  self.indopts.grid(row=1, column=1)
  </code></pre>
  
  <p>If I change the <code>after_idle()</code> to just <code>after()</code>, it works fine. </p>
  
  <p>I assume this is because clicking on an <code>OptionMenu</code> actually sets up its own <code>after_idle()</code> call to open the menu, which is then competing with the one I have in <code>process_queue()</code>.</p>
  
  <p>I can certainly use <code>after()</code> in my function if need be - it might not be optimally fast at processing the queue, but it's not the end of the world. But is there a more graceful way to handle this? Surely most GUIs should be able to handle having <code>after_idle()</code> called somewhere when an <code>OptionMenu</code> exists?</p>