soffes / ssdatakit

Eliminate your Core Data boilerplate code
MIT License
453 stars 57 forks source link

fix main queue context race condition #38

Closed aaronwasserman closed 9 years ago

aaronwasserman commented 9 years ago

It's possible to attempt to create a child context of the mainQueueContext (on a different thread) after the NSManagedObjectContext is initialized, but not before its parent context is set. This becomes likely since [self privateQueueContext] can take a long time to finish. This change prevents that race condition.

soffes commented 9 years ago

Good find.