need to use NSManagedContext performBlock for contexts with NSMainQueueConcurrencyType?

  • If I create a child context of type NSMainQueueConcurrencyType such as:

        context = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType];
        [context setParentContext:mainContext];

    do I need to call [context performBlock:^{ // some code }];

    or can I just use the context normally if I know the code is being executed on the main thread/queue?

    Similarly, do I need to use performBlock on the UIManagedDocument's managedObjectContext property when I know the code is being executed on the main thread?

    I think the answer to both questions is "no, you do not need to use performBlock", but I'd like to be certain.

    Thanks,
    Dave
previous month january 2012 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today