So, this is safe to call even if all my models were created / accessed on 
the main thread?

    dispatch_async(dispatch_get_global_queue(
DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{

        NSError* error;

        CBLDatabase* database = [[[CBLManager sharedInstance] copy] 
existingDatabaseNamed:@"mydatabase" error:&error];

        [database saveAllModels:&error];

    });


On Saturday, May 17, 2014 6:05:03 PM UTC-7, Pascal wrote:
>
> Yes: http://docs.couchbase.com/couchbase-lite/cbl-ios/#concurrency-support
>
>
> On Saturday, May 17, 2014 6:52:01 PM UTC-4, Ragu Vijaykumar wrote:
>>
>> When using CoreData, I was able to accomplish background saving with a 
>> parent NSManagedObjectContext in the background, and a child 
>> NSManagedObjectContext on the main thread. Any saves on the main UI thread 
>> to NSManagedObjects would then save in the background without disrupting 
>> the UI. I've been trying to figure out how to accomplish the same sort of 
>> behavior with CBL - Is there any way to accomplish this with CBL?
>>
>> Cheers,
>> Ragu
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/077d72ce-d751-4515-90a8-fbbcaa7a99a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to