title: Why can't tkinter run in other threads on OSX?
body: <p>When calling <code>mainloop()</code> for a <code>Tk</code> on MacOS in a thread beside the same one, it fails with a <code>RuntimeError: calling Tcl from different apartment</code>.</p>
  <p>However, if I do this on Linux, it works fine.</p>
  <p>Why does this happen on MacOS only?
  Is there any way around this?</p>
  <p><em>Test code:</em></p>
  <pre class="lang-py prettyprint-override"><code>import tkinter as tk
  import threading
  
  def start_tk_with_mainloop():
      x = tk.Tk()
      x.mainloop()
  
  thread = threading.Thread(target=start_tk_with_mainloop)
  thread.start()
  </code></pre>
  <p><em>Note:</em>
  This is not a duplicate of <a href="https://stackoverflow.com/questions/45799121/runtimeerror-calling-tcl-from-different-appartment-tkinter-and-threading">here</a> because this question is specifically about why it only happens on MacOS.</p>
  <p><code>tkinter.TkVersion</code>: <code>8.6</code></p>
  <p><code>python</code>: <code>3.6</code></p>