Hi,

I was wondering how to properly use CBL both in the main thread and 
background thread to the same database. Should I instantiate a CBLManager 
both in the main thread ([CBLManager sharedInstance]) and background 
thread ([[CBLManager sharedInstance] copy]) and then basically treat the 
two as if they were running in separate programs (each using their own 
CBLModels, etc.) with no sharing between the two? If I am not sharing any 
dynamic objects between the two, is there anything else that I need to 
worry about. 

Basically, I want to have a background thread load a bunch of documents 
into the database, and the main thread may need access to these documents 
during it's lifecycle. If I share the docIDs (NSStrings) between the 
threads, do I just make a CBLDocument with the docID and CBLModel with the 
CBLDocument in both threads and operate that way?

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/8a5ab13e-3247-452c-a204-a483441c83b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to