A thread safety warpper for CoreData.