Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. DispatchQueue.global(qos: .background).async {
  2. let context = NSManagedObjectContext.getMainContext() // made up method
  3. context.fetch(/* ... */)
  4. }
  5.  
  6. DispatchQueue.global(qos: .background).async {
  7. let context = NSManagedObjectContext.createPrivateContextAndAssignParent() // made up method
  8. context.performAndWait {
  9. context.fetch(/* ... */)
  10. }
  11. }
  12.  
  13. DispatchQueue.global(qos: .background).async {
  14. NSManagedObjectContext.getMainContext()
  15. context.performAndWait {
  16. context.fetch(/* ... */)
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement