Hi,
So I'm using a custom dispatchQueue on my CBLDatabase in order to be able
to process large numbers of CBLModel objects. For example, I may be
importing thousands of lines from a CSV file or migrating to Couchbase from
an older version of my database schema. I want these large database
operations to be performed on a background thread so that I can have the
main thread update things like progress bars and status updates.
That all works great so far.
However, I ran into a problem with replication. Because replication happens
on a background thread, the KVO notifications of objects being created
isn't happening on the main thread so I'm getting crashes.
The debugger tends to stop on the willChangeValueForKey line of the
following snippet in CBLModel in the document:didChange: method.
// Prepare to send KVO notifications about all my properties in case
they changed:
NSSet* keys = [[self class] propertyNames];
for (NSString* key in keys)
[self willChangeValueForKey: key];
To work around this problem I've stopped using my custom dispatchQueue, but
that also means I am unable to update the UI to show progress indicators
and status messages.
Is there a proper way to be showing progress indicators without having the
database access go through a custom dispatchQueue?
thanks,
Brendan
--
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/0fd44602-f4ca-4e53-bd25-cf0a72ee3d77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.