I\'m trying to download some JSON objects in the background and am doing quite a bit of multi threading. Once the operation completes, I noticed that this assertion fails:
Your particular situation (downloading JSON in the background) is quite common. I have seen a number of implementations that make do without multiple contexts.
In many cases, the simplest and by far the robustest way is to have the objects that do the downloads notify the main thread via protocol or notification of a finished download. You then do the saving on the main thread.