You should encapsulate these two lines in a `using (ThreadAffinity())` block