title: Using dispatcher to invoke on another thread - Config/Settings is not threadsafe in .Net Core 3.1
body: <h2>Issue:</h2>
  <p>I am trying to update the GUI from a second thread.
  Unfortunately the label stays the same. At first I thought there is an issue with the dispatcher but it works fine. It appears that the configuration is not threadsafe!</p>
  <h2>Code to reproduce:</h2>
  <p>I have a Settings File which is mainly used to keep variables persistent during application relaunches:
  <a href="https://i.stack.imgur.com/ONg7t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ONg7t.png" alt="enter image description here" /></a></p>
  <p>this is the Update code:</p>
  <pre><code>// get the amount of tickets created for me last week
  int amountOftickets = JiraInterface.DayStatisticsGenerator.GetLastWeeksTicketAmount();
  config.Default.Lastweekstickets = amountOftickets; // int == 12;
  // Update GUI on GUI thread
  mainWindow.Dispatcher.Invoke(() =&gt;
  {
      mainWindow.SetIconsAccordingtoConfig();
      mainWindow.NumberTicketsCreated.Content = config.Default.Lastweekstickets.ToString(); // int == 0!!
  });
  </code></pre>
  <p>Does anyone have an Idea on how to shove the running configuration  from the thread who updated it to the Gui thread?</p>