I'm having problems using the child context as a notepad with the NSPrivateQueueConcurrencyType attribute.
My main data stack is as follows: 
View controllers use the main context. The worker context is used to import data from the API. I use mergeChangesFromContextDidSaveNotification to merge the changes between the Main and Worker contexts. If I leave the working child context out of the equation, it seems to work correctly.
However, I would like to use the working child context as a notepad when importing objects. Some data requires the creation of nested objects, and if there is an error during the build process, I would just like to discard this context. If the assembly succeeds, I expect that I can save the working child context, make changes to the working context, which can then save and merge the changes into the main context.
However, when I try to execute a select query in the Childer Child Context to search or create, although it is executed inside the performBlock in the Childer Child Context, I get a multi-threaded statement.
I'm not sure which code snippets will be helpful in answering this question, but my main problem is that my general approach will not work. Does a private queue context as a child of another context have a bad idea?
EDIT:
The failure I encountered is when a working child context tries to execute a select query in order to perform a search or create operation. It does not use any managed objects in the predicate and performBlockAndWait it in performBlockAndWait . The explanation I get is a "NSInternalInconsistencyException", reason: "statement is still active . " The failure is intermittent, but so far it seems that this only happens when I have nested contexts of child employees. (i.e. the context of the working child in my diagram will have a child context of its own creation objects)
A fetch request that causes failures is always executed for a search or create operation, so it tries to get any objects with a unique identifier property corresponding to the identifier of the imported objects. Thus, the predicate is always similar to "identifier in ["1234", "abc", "etc" ]
As I mentioned in the commentary, I initially used the context setting PSC -> Private Context -> Main Context -> Private Worker. My user interface hangs when the working context retrieves and saves when importing data, so I'm trying to reorganize this stack to free up the user interface.