Skip to content

Instantly share code, notes, and snippets.

@pookjw
Created September 26, 2025 12:25
Show Gist options
  • Select an option

  • Save pookjw/d59111161f756fc1793fe90c3789deb0 to your computer and use it in GitHub Desktop.

Select an option

Save pookjw/d59111161f756fc1793fe90c3789deb0 to your computer and use it in GitHub Desktop.
import CoreData
let c1 = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
let c2 = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
// 문제 없음
c1.performAndWait {
c2.performAndWait {
c1.performAndWait {
}
}
c2.performAndWait {
}
}
// 문제됨
c1.performAndWait {
c2.perform {
c1.performAndWait {
}
}
c2.performAndWait {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment